[CMake] Setting CMAKE_C_COMPILER CMAKE_CXX_COMPILER Deletes Cache?
nkwmailinglists at gmail.com
Mon May 23 17:37:31 EDT 2011
Ran into this with CMake 2.8.4 on Linux -- though apparently not on my
OS X machine, go figure.
I had a nightly build shell script that as a matter of course set
CMAKE_C_COMPILER and CMAKE_CXX_COMPILER on the command line. I was
getting mysteriously unnamed builds in our Dashboard.
What I traced it down to:
When I ran cmake in a batch that sets the compiler variables, cmake
decided that the compilers had been changed and deleted the cache and
reran itself. Unfortunately it also forgot BUILDNAME -- which I also
set on the command line, and the BUILDNAME reverted to its default
value (set in my top level CMakelists.txt) of UNKNOWN-build.
So is there any way not to descend into this hell of deleted cache variables?
More information about the CMake