summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-06-04 17:21:55 (GMT)
committerBrad King <brad.king@kitware.com>2014-06-04 18:27:02 (GMT)
commit528e8af19f68c01c3a42af9e74801a39c16237dd (patch)
treed6af200ff75eb396cf5157ff9bc12f797ed8ef7c /Source/cmake.cxx
parent98afb4549f66c692eeec8bbc8a1f7b333d3051a5 (diff)
downloadCMake-528e8af19f68c01c3a42af9e74801a39c16237dd.zip
CMake-528e8af19f68c01c3a42af9e74801a39c16237dd.tar.gz
CMake-528e8af19f68c01c3a42af9e74801a39c16237dd.tar.bz2
Allow a toolchain file to specify a generator toolset
Delay use of CMAKE_GENERATOR_TOOLSET until the CMakeSystem.cmake file has been configured and loaded during the first project() or enable_language() command. This gives the toolchain file named by CMAKE_TOOLCHAIN_FILE a chance to set CMAKE_GENERATOR_TOOLSET. This point is still early enough to set the generator toolset prior to the initialization of any languages that might use the toolset. The cmake::GeneratorToolset member variable remains an indication of what was specified by the -T option or loaded from the cache. It does not need to be updated based on the toolchain file setting. The cmMakefile::TryCompile can still pass cmake::GeneratorToolset into the inner instance because the try-compiled project will do platform and language initialization using the CMakeSystem module configured for the outer project. Extend the RunCMake.GeneratorToolset test with cases that use a toolchain file to set CMAKE_GENERATOR_TOOLSET.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx5
1 files changed, 0 insertions, 5 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 9906c4b..16dc724 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1462,11 +1462,6 @@ int cmake::ActualConfigure()
"Name of generator toolset.",
cmCacheManager::INTERNAL);
}
- if(!this->GeneratorToolset.empty() &&
- !this->GlobalGenerator->SetGeneratorToolset(this->GeneratorToolset))
- {
- return -2;
- }
// reset any system configuration information, except for when we are
// InTryCompile. With TryCompile the system info is taken from the parent's