[CMake] Get parse error with cmake -C

Alexander Neundorf a.neundorf-work at gmx.net
Thu Oct 30 17:46:36 EDT 2008


On Thursday 30 October 2008, Nicolas Desprès wrote:
> Hi all,
>
> I'm trying cmake -C with cmake-2.6.3-RC-1 and I get the following output:
>
> $ cmake -C ../_build-r/CMakeCache.txt
> loading initial cache file ../_build-r/CMakeCache.txt
> CMake Error: Error in cmake code at
> /home/despres/src/urbi-lab/_build-r/CMakeCache.txt:17:
> Parse error.  Expected a command name, got unquoted argument with text
> "//No". CMake Error: Error processing file:../_build-r/CMakeCache.txt
>
> Note, that the CMakeCache.txt file I'm using has been generated by a
> previous call to cmake.
>
> Obviously, cmake does not parse C++ style comment used in CMakeCache.txt.
>
> Maybe I'm not using the -C option properly...

You cannot load a file in the cmake cache format with it (documentation may be 
not too clear on this), the loaded file has to be a cmake script.

Alex


More information about the CMake mailing list