[CMake] execute a script before and after configuration
Eric Noulard
eric.noulard at gmail.com
Sat Jan 21 06:09:01 EST 2012
2012/1/21 Dominik Szczerba <dominik at itis.ethz.ch>:
>>>> You might use an EXECUTE_PROCESS() command at the beginning of your
>>>> CMakeLists.txt to unload the modules, and another EXECUTE_PROCESS()
>>>> at the end to reload them.
>
> Will try, thanks for the hint!
>
>>> Doesn't the module switching involve setting environment variables? You're
>>> going to have to do that before invoking CMake aren't you?
>
> No, it means calling something like "module un/load XXXX" from command line.
Dominik,
Running something from the command line does not mean it doesn't change the
environment.
Would you try
$ env > env1.txt
$ module unload sysmodule_you_dont_want
$ env > env2.txt
$ cmake -E compare_files env1.txt env2.txt
I'd be surprise if nothing changed but I may be wrong.
--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
More information about the CMake
mailing list