summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-09-25 14:08:57 (GMT)
committerBrad King <brad.king@kitware.com>2018-09-25 17:27:08 (GMT)
commitd8294fefe8063cc2e0a0cfecf7fd8fef619cf0da (patch)
treec0204003a278016c406cabd492e1d4155707f5cc /Source/cmake.cxx
parent55a5b56e083c4c2d4e768212422991a22569ecb4 (diff)
downloadCMake-d8294fefe8063cc2e0a0cfecf7fd8fef619cf0da.zip
CMake-d8294fefe8063cc2e0a0cfecf7fd8fef619cf0da.tar.gz
CMake-d8294fefe8063cc2e0a0cfecf7fd8fef619cf0da.tar.bz2
cmake: Fix generator platform under --build mode
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index c26a380..889a5fb 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2467,6 +2467,14 @@ int cmake::Build(int jobs, const std::string& dir, const std::string& target,
return 1;
}
}
+ const char* cachedGeneratorPlatform =
+ this->State->GetCacheEntryValue("CMAKE_GENERATOR_PLATFORM");
+ if (cachedGeneratorPlatform) {
+ cmMakefile mf(gen, this->GetCurrentSnapshot());
+ if (!gen->SetGeneratorPlatform(cachedGeneratorPlatform, &mf)) {
+ return 1;
+ }
+ }
std::string output;
std::string projName;
const char* cachedProjectName =