diff options
author | Brad King <brad.king@kitware.com> | 2018-06-19 14:53:13 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-06-19 14:54:28 (GMT) |
commit | e893c53b8c09984bc11bfc2b7a831930eec9fb91 (patch) | |
tree | 80bb6df9ec3dff710aaa69f8de35c4f4fbab08a2 /Source/cmGlobalXCodeGenerator.cxx | |
parent | 65f73c0ae178d98fec5ae0c103faebca2b02ba3b (diff) | |
parent | bc5bcad45e1eaebbea0f1409f096d166cdb778d9 (diff) | |
download | CMake-e893c53b8c09984bc11bfc2b7a831930eec9fb91.zip CMake-e893c53b8c09984bc11bfc2b7a831930eec9fb91.tar.gz CMake-e893c53b8c09984bc11bfc2b7a831930eec9fb91.tar.bz2 |
Merge topic 'xcode-10-archs'
bc5bcad45e Xcode: Detect architecture(s) using ARCHS instead of CURRENT_ARCH
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2153
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index b461598..dae4592 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -3160,8 +3160,13 @@ void cmGlobalXCodeGenerator::ComputeArchitectures(cmMakefile* mf) if (this->Architectures.empty()) { // With no ARCHS we use ONLY_ACTIVE_ARCH. // Look up the arch that Xcode chooses in this case. - if (const char* arch = mf->GetDefinition("CMAKE_XCODE_CURRENT_ARCH")) { + if (const char* arch = mf->GetDefinition("CMAKE_XCODE_ARCHS")) { this->ObjectDirArchDefault = arch; + // We expect only one arch but choose the first just in case. + std::string::size_type pos = this->ObjectDirArchDefault.find(';'); + if (pos != std::string::npos) { + this->ObjectDirArchDefault = this->ObjectDirArchDefault.substr(0, pos); + } } } |