summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-10-18 13:01:36 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-10-18 13:01:48 (GMT)
commitb34b4c5eac27bfc4a1e46f2b46ba17f5be6a8565 (patch)
treecca98eb61f39604776d35cf96dc78872246a8f8b /Source/cmake.cxx
parentc867981c9d9bc8548d34f726940cd50b8d05d71c (diff)
parente7d57bc3c35e7c47746caf91591ef748b9ce3012 (diff)
downloadCMake-b34b4c5eac27bfc4a1e46f2b46ba17f5be6a8565.zip
CMake-b34b4c5eac27bfc4a1e46f2b46ba17f5be6a8565.tar.gz
CMake-b34b4c5eac27bfc4a1e46f2b46ba17f5be6a8565.tar.bz2
Merge topic 'vs-vctargetspath'
e7d57bc3c3 VS: Propagate CMAKE_VS_GLOBALS into custom targets 45b4b4b930 VS: Propagate CMAKE_VS_GLOBALS into compiler id projects 548e9051a4 VS: Add support to override VCTargetsPath through toolset 99e83d4235 cmake: Teach --build mode to load CMAKE_GENERATOR_TOOLSET Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3817
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 07a1fce..4a6108d 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2619,6 +2619,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 =