From d8294fefe8063cc2e0a0cfecf7fd8fef619cf0da Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 25 Sep 2018 10:08:57 -0400 Subject: cmake: Fix generator platform under --build mode --- Source/cmake.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) 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 = -- cgit v0.12