[CMake] Run/build custom command/target only when "input" files change

Mika.Rajala at patria.fi Mika.Rajala at patria.fi
Tue Mar 8 06:42:13 EST 2011


Second try, replied to sender directly :)

Now that i checked the IDL_OUTPUT_DIR i found out that  the second output 
file is always missing, the .tlb one.

Maybe this is why it always runs that command?

Testing..




Richard Wackerbarth <richard at NFSNet.org> 
Sent by: cmake-bounces at cmake.org
08.03.2011 13:18

To
Mika.Rajala at patria.fi
cc
cmake at cmake.org
Subject
Re: [CMake] Run/build custom command/target only when "input" files change







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?
_______________________________________________
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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110308/c24a2590/attachment-0001.htm>


More information about the CMake mailing list