[cmake-developers] How to use cmake::SetCacheArgs(...)?
Brad King
brad.king at kitware.com
Wed Nov 30 13:10:04 EST 2016
On 11/30/2016 12:06 PM, Tobias Hunger wrote:
> start over with a clean cache since the compiler changed (which is correct).
>
> After cmake::Configure(...) returns values some of the values are gone
> again. E.g. CMAKE_BUILD_TYPE changed back from "Debug" to "".
>
> Is this expected behavior?
Yes, though not really ever intended. The auto-rerun-on-compiler-change
is a horrible hack that was done to make changing the compiler through
ccmake possible on initial configuration. In general one should not try
to change the compiler of an existing build tree, especially not from
a scripted environment.
If you want to ensure a fresh one-step configuration then always remove
CMakeCache.txt and CMakeFiles/ before configuring.
-Brad
More information about the cmake-developers
mailing list