On Fri, Jun 19, 2009 at 06:10:16PM +0200, pjtr hahn wrote: > # generate source file > add_custom_command( OUTPUT __phony_target_name > COMMAND some_command_to_generate > ARGS -o __my_outfile.cpp > .... > )
Why don't you just do OUTPUT __my_outfile.cpp? That's what OUTPUT is for -- to tell CMake which custom_command generates the file you need. If you still have trouble with dependencies, do an add_custom_target() that DEPENDS on __my_outfile.cpp, then add_dependendcies (__my_target __custom_target). > set_source_files_properties( __phony_target_name PROPERTIES SYMBOLIC TRUE ) > > set_source_files_properties( __my_outfile.cpp PROPERTIES GENERATED TRUE ) > > set_source_files_properties( __my_outfile.cpp PROPERTIES > OBJECT_DEPENDS ${__phony_target} ) What is ${__phony_target}? Is it just __phony_target_name? What is that OBJECT_DEPENDS line trying to accomplish? I've never used that property but I don't think it should be necessary here. > add_executable( __my_target __my_outfile.cpp ) tyler _______________________________________________ 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