[CMake] execute a script before and after configuration

Dominik Szczerba dominik at itis.ethz.ch
Fri Jan 20 08:30:00 EST 2012


Hmmm I managed to force it by

cmake -DCMAKE_COMMAND=/users/dsz/bin/mycmake

and it indeed appears now in the cache file, but it does not seem to
unload/reload the modules, so I guess it is not used instead of
cmake... else how can I check if it is invoked?

Thanks a lot


On Fri, Jan 20, 2012 at 2:24 PM, Dominik Szczerba <dominik at itis.ethz.ch> wrote:
> Nice idea, but this internal variable gets overwritten and resets back
> to the system cmake... any ideas?
>
> Thanks
> Dominik
>
> On Fri, Jan 20, 2012 at 2:06 PM, Rolf Eike Beer <eike at sf-mail.de> wrote:
>>> Hi,
>>>
>>> I am building a big software framework on a cray system whereby during
>>> cmake "configuration" phase I need to unload certain system modules
>>> (so that some small test programs are allowed to run without
>>> scheduler) and afterwards, before the actual build phase starts, I
>>> need to load them back. Doing it manually is troublesome, because
>>> sometimes typing "make" triggers cmake to re-run, and then re-build,
>>> so there is no chance to load/unload the modules.
>>>
>>> So, how would I force one script to run when cmake is started and one
>>> other script before build starts?
>>>
>>> Many thanks for any directions.
>>
>> What about overriding CMAKE_COMMAND in your CMakeCache.txt with a script
>> that does your module fiddling, run cmake, and fiddle back?
>>
>> Eike
>> --
>>
>> 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
>>


More information about the CMake mailing list