[CMake] Run/build custom command/target only when "input" files change
Richard Wackerbarth
richard at NFSNet.org
Tue Mar 8 06:18:36 EST 2011
On Mar 8, 2011, at 5:10 AM, Mika.Rajala at patria.fi wrote:
>
> foreach(in_file ${ARGN})
>
> ....
>
> ADD_CUSTOM_COMMAND(
> OUTPUT ${IDL_OUTPUT_DIR}/${out_file}.h
> ${IDL_OUTPUT_DIR}/${out_file}.tlb
> DEPENDS ${in_file}
> COMMAND(${MIDL_EXECUTABLE} ${in_file} <insert other args here>
> WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
> )
>
> ....
>
> endforeach()
> Did i miss something?
>
> -mika
How is "out_file" defined?
At the beginning of the second run, what files are in the {IDL_OUTPUT_DIR} directory?
More information about the CMake
mailing list