summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio10Generator.cxx
diff options
context:
space:
mode:
authorAlexander Boczar <alexboc@microsoft.com>2019-09-14 00:32:13 (GMT)
committerBrad King <brad.king@kitware.com>2019-10-15 17:28:41 (GMT)
commit99e83d423500e11a8e85c2032e8c536bce175ed1 (patch)
treead294f09e5fb3f9804e3f99d64f95d9bbc51761a /Source/cmGlobalVisualStudio10Generator.cxx
parent60509518124e715994900afa88530558b248510c (diff)
downloadCMake-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/cmGlobalVisualStudio10Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 09a49e1..63915c5 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -193,7 +193,7 @@ static void cmCudaToolVersion(std::string& s)
}
bool cmGlobalVisualStudio10Generator::SetGeneratorToolset(
- std::string const& ts, cmMakefile* mf)
+ std::string const& ts, bool build, cmMakefile* mf)
{
if (this->SystemIsWindowsCE && ts.empty() &&
this->DefaultPlatformToolset.empty()) {
@@ -208,6 +208,10 @@ bool cmGlobalVisualStudio10Generator::SetGeneratorToolset(
return false;
}
+ if (build) {
+ return true;
+ }
+
if (!this->FindVCTargetsPath(mf)) {
return false;
}