Re: [CMake] execute a script before and after configuration

2012-01-25 Thread Michael Hertling
On 01/21/2012 11:28 AM, Dominik Szczerba wrote: > On Sat, Jan 21, 2012 at 10:50 AM, Dominik Szczerba > wrote: > 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. >> >>

Re: [CMake] execute a script before and after configuration

2012-01-22 Thread Dominik Szczerba
I now see your point about changed env, sorry, I misunderstood you before. Indeed module load/unload changes the env, but the changes are excessive, involving include and linking paths for the currently loaded compilers (and there can be a few...) and many other switches involving paths to package

Re: [CMake] execute a script before and after configuration

2012-01-21 Thread Eric Noulard
2012/1/21 Dominik Szczerba : >> 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 i

Re: [CMake] execute a script before and after configuration

2012-01-21 Thread Dominik Szczerba
> 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. Y

Re: [CMake] execute a script before and after configuration

2012-01-21 Thread Eric Noulard
2012/1/21 Dominik Szczerba : > >> May be Dominik can explain this >> "so that some small test programs are allowed to run without >> scheduler" >> a little more? > > Simplest example, suppose I need to compute epsilon and save it in > myconfig.h. To this end I need to run a small program and I use

Re: [CMake] execute a script before and after configuration

2012-01-21 Thread Eric Noulard
2012/1/21 Dominik Szczerba : 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 enviro

Re: [CMake] execute a script before and after configuration

2012-01-21 Thread Dominik Szczerba
On Sat, Jan 21, 2012 at 10:50 AM, Dominik Szczerba wrote: 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! Unfortunately, it does not

Re: [CMake] execute a script before and after configuration

2012-01-21 Thread Dominik Szczerba
>>> 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 h

Re: [CMake] execute a script before and after configuration

2012-01-21 Thread Eric Noulard
2012/1/21 David Cole : > > > On Friday, January 20, 2012, Michael Hertling wrote: >> On 01/20/2012 01:57 PM, Dominik Szczerba 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 >>> (s

Re: [CMake] execute a script before and after configuration

2012-01-20 Thread David Cole
On Friday, January 20, 2012, Michael Hertling wrote: > On 01/20/2012 01:57 PM, Dominik Szczerba 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

Re: [CMake] execute a script before and after configuration

2012-01-20 Thread Michael Hertling
On 01/20/2012 01:57 PM, Dominik Szczerba 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

Re: [CMake] execute a script before and after configuration

2012-01-20 Thread Dominik Szczerba
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

Re: [CMake] execute a script before and after configuration

2012-01-20 Thread Dominik Szczerba
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 wrote: >> Hi, >> >> I am building a big software framework on a cray system whereby during >> cmake "configuration" phase I need

Re: [CMake] execute a script before and after configuration

2012-01-20 Thread Rolf Eike Beer
> 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 t

[CMake] execute a script before and after configuration

2012-01-20 Thread Dominik Szczerba
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. Doi