https://github.com/Kitware/CMake
Revision 3b60232ebcde69789a6c26f5c523ad107a7099c5 authored by Brad King on 07 July 2015, 18:12:38 UTC, committed by Brad King on 07 July 2015, 18:12:38 UTC
Since commit v2.4.0~4158 (When the initially configured generator is invalid, allow the user to change the generator without deleting the cache by hand, 2003-05-13) we remove CMAKE_GENERATOR from the cache if an error occurs and CMAKE_MAKE_PROGRAM is not cached. This worked at the time because all generators initialized the CMAKE_MAKE_PROGRAM cache entry. Since commit v3.0.0-rc1~260^2~4 (VS: Switch to internal CMAKE_MAKE_PROGRAM lookup by generators, 2013-11-15) and commit v3.2.0-rc1~39^2 (Xcode: Switch to internal CMAKE_MAKE_PROGRAM lookup by generator, 2015-01-28) the VS and Xcode generators no longer store CMAKE_MAKE_PROGRAM in the cache. Therefore any error during generation would wipe out CMAKE_GENERATOR from the cache and cause the next configuration to choose a default generator. Simply drop the behavior introduced by the original commit and always preserve CMAKE_GENERATOR. Since the time that behavior was introduced a lot more state is now saved in CMakeCache.txt and CMakeFiles/ during the initial configuration so it is not safe to change generators without starting fresh anyway.
1 parent 6ece2df
Tip revision: 3b60232ebcde69789a6c26f5c523ad107a7099c5 authored by Brad King on 07 July 2015, 18:12:38 UTC
cmake: Preserve cached CMAKE_GENERATOR when an error occurs (#15640)
cmake: Preserve cached CMAKE_GENERATOR when an error occurs (#15640)
Tip revision: 3b60232
File | Mode | Size |
---|---|---|
Auxiliary | ||
Help | ||
Licenses | ||
Modules | ||
Source | ||
Templates | ||
Tests | ||
Utilities | ||
.gitattributes | -rw-r--r-- | 613 bytes |
.hooks-config.bash | -rw-r--r-- | 866 bytes |
CMakeCPack.cmake | -rw-r--r-- | 6.5 KB |
CMakeCPackOptions.cmake.in | -rw-r--r-- | 4.5 KB |
CMakeGraphVizOptions.cmake | -rw-r--r-- | 153 bytes |
CMakeLists.txt | -rw-r--r-- | 25.0 KB |
CMakeLogo.gif | -rw-r--r-- | 4.4 KB |
CONTRIBUTING.rst | -rw-r--r-- | 1008 bytes |
CTestConfig.cmake | -rw-r--r-- | 870 bytes |
CTestCustom.cmake.in | -rw-r--r-- | 5.0 KB |
CompileFlags.cmake | -rw-r--r-- | 3.1 KB |
Copyright.txt | -rw-r--r-- | 2.6 KB |
DartConfig.cmake | -rw-r--r-- | 804 bytes |
README.rst | -rw-r--r-- | 2.9 KB |
bootstrap | -rwxr-xr-x | 57.5 KB |
cmake_uninstall.cmake.in | -rw-r--r-- | 790 bytes |
configure | -rwxr-xr-x | 99 bytes |
doxygen.config | -rw-r--r-- | 27.4 KB |
Computing file changes ...