On 2013-05-14 06:19, Nils Gladitz wrote:
I think something like this:add_executable(2 2.cpp) add_executable(gen gen.cpp) add_custom_command(OUTPUT 2.cpp COMMAND gen "${CMAKE_CURRENT_SOURCE_DIR}/2.txt" -o 2.cpp DEPENDS 2.txt )
'DEPENDS 2.txt gen' :-). You want the dependency on 'gen' to ensure it has been built before trying to run the custom command (also because you usually want to re-run the command if 'gen' changes).
-- Matthew -- 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
