diff options
author | Alexander Boczar <alexboc@microsoft.com> | 2019-09-14 00:32:13 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-10-15 17:28:41 (GMT) |
commit | 99e83d423500e11a8e85c2032e8c536bce175ed1 (patch) | |
tree | ad294f09e5fb3f9804e3f99d64f95d9bbc51761a /Source/cmake.cxx | |
parent | 60509518124e715994900afa88530558b248510c (diff) | |
download | CMake-99e83d423500e11a8e85c2032e8c536bce175ed1.zip CMake-99e83d423500e11a8e85c2032e8c536bce175ed1.tar.gz CMake-99e83d423500e11a8e85c2032e8c536bce175ed1.tar.bz2 |
cmake: Teach --build mode to load CMAKE_GENERATOR_TOOLSET
Extend the `cmGlobalGenerator::SetGeneratorToolset` signature to
indicate when it is called from `cmake::build`.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index bbd33a7..47cc59d 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2620,6 +2620,14 @@ int cmake::Build(int jobs, const std::string& dir, return 1; } } + const char* cachedGeneratorToolset = + this->State->GetCacheEntryValue("CMAKE_GENERATOR_TOOLSET"); + if (cachedGeneratorToolset) { + cmMakefile mf(gen, this->GetCurrentSnapshot()); + if (!gen->SetGeneratorToolset(cachedGeneratorToolset, true, &mf)) { + return 1; + } + } std::string output; std::string projName; const char* cachedProjectName = |