summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.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/cmGlobalXCodeGenerator.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/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 67f1a46..8a731cf 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -267,7 +267,7 @@ std::string cmGlobalXCodeGenerator::FindXcodeBuildCommand()
}
bool cmGlobalXCodeGenerator::SetGeneratorToolset(std::string const& ts,
- cmMakefile* mf)
+ bool build, cmMakefile* mf)
{
if (ts.find_first_of(",=") != std::string::npos) {
std::ostringstream e;
@@ -283,6 +283,9 @@ bool cmGlobalXCodeGenerator::SetGeneratorToolset(std::string const& ts,
return false;
}
this->GeneratorToolset = ts;
+ if (build) {
+ return true;
+ }
if (!this->GeneratorToolset.empty()) {
mf->AddDefinition("CMAKE_XCODE_PLATFORM_TOOLSET", this->GeneratorToolset);
}