[CMake] Problems with reusing CMakeCache.txt

Jens Thomas j.m.h.thomas at dl.ac.uk
Wed May 9 11:04:45 EDT 2007


Hi,

I'm having problems reusing a CMakeCache.txt file using
cmake-2.4.6-Darwin-universal for an out-of-source build for VTK on Mac
OSX - although I don't think this is Mac OSX specific as I've hit it on
other platforms in the past, but just worked around it by generating a
new CMakeCache.txt file from scratch - which is obviously far from ideal.

I've generated a CMakeCache.txt file but I would now like to change a
couple of variables. I fire up ccmake in a directory that contains only
the CMakeCache.txt file as follows:

ccmake -C ./CMakeCache.txt

The file is read in file and the ccmake menu shows me all the variables 
that I set before. I then change the variable  I'm interested in and 
press "c" to configure.

I then get a blank screen with the following at the bottom:

CMake produced the following output
                                                                                             
 
CMake Version 2.4 - patch 6
Press [e] to exit help

If I press "e", I then get returned to the main cmake screen, but there
is not "g" option to generate a Makefile.

If I run cmake instead of ccmake, I get the following:

csemac02:~/ccp1gui_app/vtk/vtk_py2.5 jmht$
../cmake-2.4.6-Darwin-universal/bin/cmake -C ./CMakeCache.txt
loading initial cache file ./CMakeCache.txt
CMake Error: Error in cmake code at
/Users/jmht/ccp1gui_app/vtk/vtk_py2.5/CMakeCache.txt:17:
Parse error.  Expected a command name, got unquoted argument with text
"//Library".
-- Configuring done

and again no Makefile is generated. I've checked the line it's
complaining about and it seems that the syntax is valid.

I've placed the CMakeCache.txt file at the following url:

http://www.cse.scitech.ac.uk/qcg/jens/CMakeCache.txt

as it's too big for the list.

Many thanks,

Jens Thomas


More information about the CMake mailing list