[CMake] touch flag once all (target) sucess

t m cmake at majchrowski.co.uk
Fri Aug 12 04:35:31 EDT 2011


>>> 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
>>> 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
> 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.


Thank you for feedback Michael. I take care about maintaing a bunch of
common cmake scripts for group of developers.
The workflow is a little bit complicated to describe it in short. I
just need to know
the compilation status form other processes that call: make all and
make package.
Therefore I think simply file flag is the best choice. I don't wont to
make it in wrapper
for make and I'm looking for solution in cmake.

The implementation of this ticket
http://www.cmake.org/Bug/view.php?id=8438#c26520 will help me.
However this is 2,5 years old ticket so I'm looking for some time
being solution.

Thanks, T. Majchrowski.


More information about the CMake mailing list