[CMake] Revision header

2012-01-21 Thread Oliver Smith
I have a script that generates a revision.h file, I've spent the morning trying to figure out how to make it so that ... any time CMake rebuilds any of the other targets, it starts by running the make-new-revision script. The idea is, I use the script manually to upversion, but anytime I type

Re: [CMake] CMake still broken post-2.8.1

2012-01-21 Thread Phil Smith
Argh, premature send syndrome: the hang is definitely because cc.rex is missing arguments and thus invokes the actual, two-stage C compiler without a source file. -Original Message- From: Brad King [mailto:brad.k...@kitware.com] Sent: Saturday, January 21, 2012 3:45 PM To: Phil Smith Cc

Re: [CMake] CMake still broken post-2.8.1

2012-01-21 Thread Phil Smith
Well, the hang occurs when I do so. The "good" line doesn't work due to paths, the temporary C file not having been created, etc., but it doesn't hang. -Original Message- From: Brad King [mailto:brad.k...@kitware.com] Sent: Saturday, January 21, 2012 3:45 PM To: Phil Smith Cc: Bill Hoffm

Re: [CMake] CMake still broken post-2.8.1

2012-01-21 Thread Brad King
On 1/21/2012 12:24 PM, Phil Smith wrote: > GOOD > C:/Program Files/Regina/regina.exe cc.rex dcc.exe CMakeCCompilerId.c > -- arg=[C:/Program Files/Regina/regina.exe] > -- arg=[cc.rex dcc.exe] > -- arg=[CMakeCCompilerId.c] [snip] > BAD > c:/Program Files/Regina/regina.exe cc.rex;dcc.exe

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] CMake still broken post-2.8.1

2012-01-21 Thread Phil Smith
Ah HAH -- you're right, sort of, though I don't understand why it's this way. With the code added that you suggested: GOOD C:/Program Files/Regina/regina.exe cc.rex dcc.exe CMakeCCompilerId.c -- arg=[COMMAND] -- arg=[C:/Program Files/Regina/regina.exe] -- arg=[cc.rex dcc.exe] -- arg=[CMak

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] how to link mysql++ in a lib with cmake

2012-01-21 Thread Eric Noulard
2012/1/21 : > Hello > > I am trying to link mysql++ in a lib, with the following cmakelist.txt file: > I get a fatal error: mysql_version.h no such a file or directory > this file is located in usr/include/mysql so I don't understand > thanks in advance if someone can help May be you simply miss

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