[CMake] something like atexit

Eric Noulard eric.noulard at gmail.com
Tue Jan 8 12:48:19 EST 2013


2013/1/8 Alexander Neundorf <a.neundorf-work at gmx.net>:
> On Tuesday 08 January 2013, Tomasz Majchrowski wrote:
>> Dear CMake Community
>>
>> I'm maintaining set of macros which is used by group of developers in their
>> own set of CMakeLists.txt
>>
>> In order to include CPack

What's the problem here?
You want to enforce that include(CPack) is at the end of main CMakeLists.txt?

>> and also do some other post check/configuration I
>> would need to have function like atexit,
>> so I will be sure that it's the last call before cmake finish processing of
>> CMakeLists.txt. Let me know if you know this kind
>> of functionality in the latest releases of cmake.
>
> It is not AFAIK.

And I'm not even sure how this would be implemented, cmake file
processing is done in several places (not only for CMakeLists.txt)
and at different time (CMake time, Build time, Install time, CPack time, ...).

What do you want, you want some CMake hook which would run
just before CMake is generating the build files?

What do you expect to be able to do in this context?

Wouldn't you be able to do that as pre-build check or custom target?
-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org


More information about the CMake mailing list