On 12/08/2010 03:54 PM, Micha Renner wrote: > Am Mittwoch, den 08.12.2010, 14:55 +0100 schrieb Vivien Delmon: >> CMAKE_MINIMUM_REQUIRED(VERSION 2.8) >> ADD_CUSTOM_COMMAND(OUTPUT toto.h toto.c >> COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/create_totoc_totoh.sh >> ) > SET_SOURCE_FILES_PROPERTIES(toto.h toto.c PROPERTIES GENERATETED TRUE) > > See: > http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:set_source_files_properties > and: > http://www.cmake.org/cmake/help/cmake-2-8-docs.html#prop_sf:GENERATED > > >> INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) >> ADD_LIBRARY(titi toto.c) >> ADD_LIBRARY(tata tata.c) > > Greetings > Micha >
the GENERATED property is set automatically by ADD_CUSTOM_COMMAND. But I suspect the problem is that you used a relative path in your OUTPUT option. *Always* specify full paths in the OUTPUT and DEPENDS options. Also, make the custom command DEPENDS on the create_totoc_totoh.sh script and it's input (perhaps it reads some configuration file or you pass it another file as an argument, etc.). Michael _______________________________________________ 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