2012/2/17 <noru...@me.com> > > Is there no way to depend on an other custom command without using extra > files?
I don't think there is beside the fact that you can specify dependency to a target (including custom target) or files using OUTPUT and DEPENDS options. > It would be nice if i can pass OUTPUT and TARGET to ADD_CUSTOM_COMMAND. You can (using OUTPUT and DEPENDS) your problem is you don't know the output of your command **statically**. > So i here is my problem in a more detail: > I want to get a list of files from > ${CMAKE_RUNTIME_OUTPUT_DIR}/${PROJECT_NAME}.app where all files beginning > with ${PROJECT_NAME} would be excluded. The result of this command is only known at build-time. At build time the "build tool" (make, Visual Studio, etc...) is running not CMake, The objective of add_custom_xxxx is to execute some commands **at build-time** on behalf of the build tool how would the build tool handle a CMake variable while CMake is not even running ??? > After that I want to iterate over that list (foreach) and run > ADD_CUSTOM_COMMAND for each file. > I see here no need for any extra files. I think you are missing a point. the "ADD_CUSTOM_COMMAND" processed by CMake when reading CMakeLists.txt at CMake time are ***TRANSLATED*** into build tool rules. I think there is a need of an extra file because it's the only way to communicate "build-time" informations between several build tool rules (i.e. derived from custom command). The only way around I see would be for you to know ahead of build (at CMake time) the list of files you'll be processing. -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake