[CMake] touch flag once all (target) sucess

Michael Wild themiwi at gmail.com
Thu Aug 11 03:50:47 EDT 2011


On Thu 11 Aug 2011 09:44:00 AM CEST, t m wrote:
>> Hi All,
>>
>> I would like to touch flag file in the CMAKE_BINARY_DIR once the
>> target all is executed with sucess.
>> Since currently I'm not able to specify the dependency to this
>> build-in target I do not have any hook to recognize if all sucess and
>> to touch file.
>>
>> 1. Does anyone knows any hint that can help me with this issue
>> 2. Question to CMake developers/maintainers: Is there any plan  to
>> implement this ticket in near future:
>> http://www.cmake.org/Bug/view.php?id=8438#c26520
>>
>> regards, T Majchrowski.
> 
> Hi All,
> 
> Does anyone knows any workarround for touching this flag till issue
> will be solved ?
> Thanks.
> 
> regards, T Majchrowski.

The only way I can think of is to provide custom functions for 
add_library, add_executable and add_custom_target (if you use the same 
name, the original commands are available by appending a underscore to 
the name) which add a dependency of you flag target on all the other 
targets.

What do you need it for?

Michael


More information about the CMake mailing list