[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:49:08 EST 2011


Yes it works..

Thanks for the help.

I need to add this to my list of things to remember.


Now i still have the problem of the missing tlb file to fix, but i'll 
handle that on my own.

-mika




Mika.Rajala at patria.fi 
Sent by: cmake-bounces at cmake.org
08.03.2011 13:42

To
cmake at cmake.org
cc

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







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
_______________________________________________
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/907d17b5/attachment.htm>


More information about the CMake mailing list