<br><br>On Friday, January 20, 2012, Michael Hertling <<a href="mailto:mhertling@online.de">mhertling@online.de</a>> wrote:<br>> On 01/20/2012 01:57 PM, Dominik Szczerba wrote:<br>>> Hi,<br>>><br>>> I am building a big software framework on a cray system whereby during<br>
>> cmake "configuration" phase I need to unload certain system modules<br>>> (so that some small test programs are allowed to run without<br>>> scheduler) and afterwards, before the actual build phase starts, I<br>
>> need to load them back. Doing it manually is troublesome, because<br>>> sometimes typing "make" triggers cmake to re-run, and then re-build,<br>>> so there is no chance to load/unload the modules.<br>
>><br>>> So, how would I force one script to run when cmake is started and one<br>>> other script before build starts?<br>>><br>>> Many thanks for any directions.<br>>><br>>> Dominik<br>
><br>> You might use an EXECUTE_PROCESS() command at the beginning of your<br>> CMakeLists.txt to unload the modules, and another EXECUTE_PROCESS()<br>> at the end to reload them.<br>><br>> Regards,<br>><br>
> Michael<br>> --<br>><br>> Powered by <a href="http://www.kitware.com">www.kitware.com</a><br>><br>> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
><br>> Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><br>><br>> Follow this link to subscribe/unsubscribe:<br>> <a href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a><br>
><br><br>Doesn't the module switching involve setting environment variables? You're going to have to do that before invoking CMake aren't you?<br>