[cmake-developers] custom_command rebuild output file when depend files change?

2015-06-01 Thread Robert Goulet
Hi, Does CMake custom_command rebuild the output file if the dependency files change? Seems like it should but I can't get it to work. The CMake command is written like this: add_custom_command( OUTPUT ${ OUTPUT_FILE}

Re: [cmake-developers] custom_command rebuild output file when depend files change?

2015-06-01 Thread Robert Goulet
}) [...] add_library(${PROJECT_NAME} STATIC ${SOURCE_FILES}) -Original Message- From: Brad King [mailto:brad.k...@kitware.com] Sent: Monday, June 1, 2015 1:33 PM To: Robert Goulet Cc: cmake-developers@cmake.org Subject: Re: [cmake-developers] custom_command rebuild output file when depend files change

Re: [cmake-developers] custom_command rebuild output file when depend files change?

2015-06-01 Thread Brad King
On 06/01/2015 02:03 PM, Robert Goulet wrote: Forgot to mention, we also do this after: set_source_files_properties(${OUTPUT_FILE} PROPERTIES GENERATED 1) That shouldn't be necessary. add_custom_command does that for you. list(APPEND SOURCE_FILES ${OUTPUT_FILE}) [...]

Re: [cmake-developers] custom_command rebuild output file when depend files change?

2015-06-01 Thread Brad King
On 06/01/2015 01:19 PM, Robert Goulet wrote: Does CMake custom_command rebuild the output file if the dependency files change? Yes, it should. This is well tested. DEPENDS ${INPUT_FILES} Are these absolute paths? OUTPUT ${OUTPUT_FILE} Where is the output file referenced? It needs to be

Re: [cmake-developers] custom_command rebuild output file when depend files change?

2015-06-01 Thread Robert Goulet
: [cmake-developers] custom_command rebuild output file when depend files change? On 06/01/2015 02:03 PM, Robert Goulet wrote: Forgot to mention, we also do this after: set_source_files_properties(${OUTPUT_FILE} PROPERTIES GENERATED 1) That shouldn't be necessary. add_custom_command does