diff options
author | Brad King <brad.king@kitware.com> | 2017-09-26 19:04:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-09-27 11:40:25 (GMT) |
commit | 298493769fe39ba57bdf766c437f1201d0fe5c9c (patch) | |
tree | b500b508e37bcd147f85c665196d298dd4445ba2 /Source/cmMakefile.cxx | |
parent | 068effa4d8ad2813499a6e79b056d79a2120e1ad (diff) | |
download | CMake-298493769fe39ba57bdf766c437f1201d0fe5c9c.zip CMake-298493769fe39ba57bdf766c437f1201d0fe5c9c.tar.gz CMake-298493769fe39ba57bdf766c437f1201d0fe5c9c.tar.bz2 |
try_compile: Simplify generator platform and toolset propagation
We don't need to save the `CMAKE_GENERATOR_{PLATFORM,TOOLSET}` values
from the cache back into the `cmake` instance. They were used only to
propagate the settings into `cmake` instances for `try_compile`, but we
already have their values in the `cmMakefile`'s variables anyway. In
fact those variables are the ones we actually give to the generators.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 32181cf..5643c97 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -3186,8 +3186,8 @@ int cmMakefile::TryCompile(const std::string& srcdir, // do a configure cm.SetHomeDirectory(srcdir); cm.SetHomeOutputDirectory(bindir); - cm.SetGeneratorPlatform(this->GetCMakeInstance()->GetGeneratorPlatform()); - cm.SetGeneratorToolset(this->GetCMakeInstance()->GetGeneratorToolset()); + cm.SetGeneratorPlatform(this->GetSafeDefinition("CMAKE_GENERATOR_PLATFORM")); + cm.SetGeneratorToolset(this->GetSafeDefinition("CMAKE_GENERATOR_TOOLSET")); cm.LoadCache(); if (!gg->IsMultiConfig()) { if (const char* config = |