summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-10-01 12:45:06 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-10-01 12:45:13 (GMT)
commit2e8b85b040ebc9bd9f2ec4107a69caf6db311823 (patch)
tree528099890103af430c2d901785fe889b36a5cf97 /Source
parentcb8c51a08e96e1cd2d02def5c4dc09ec37782ae2 (diff)
parentb6c60f14b6df53d8cb6fe442d801fdae50ddf287 (diff)
downloadCMake-2e8b85b040ebc9bd9f2ec4107a69caf6db311823.zip
CMake-2e8b85b040ebc9bd9f2ec4107a69caf6db311823.tar.gz
CMake-2e8b85b040ebc9bd9f2ec4107a69caf6db311823.tar.bz2
Merge topic 'macos-arm64'
b6c60f14b6 macOS: Default to arm64 architecture on Apple Silicon hosts 383e81aa60 Tests: Teach RunCMake to ignore Xcode internal objc warnings 8f75912176 Tests: Enable Assembler test case when CMAKE_OSX_ARCHITECTURES has one value Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5291
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGeneratorTarget.cxx3
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx4
2 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 859fa6a..bdea9fa 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -3190,6 +3190,9 @@ void cmGeneratorTarget::GetAppleArchs(const std::string& config,
if (archs) {
cmExpandList(*archs, archVec);
}
+ if (archVec.empty()) {
+ this->Makefile->GetDefExpandList("_CMAKE_APPLE_ARCHS_DEFAULT", archVec);
+ }
}
void cmGeneratorTarget::AddCUDAArchitectureFlags(std::string& flags) const
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index b78f0a0..acae2b6 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -4023,6 +4023,10 @@ void cmGlobalXCodeGenerator::ComputeArchitectures(cmMakefile* mf)
}
if (this->Architectures.empty()) {
+ mf->GetDefExpandList("_CMAKE_APPLE_ARCHS_DEFAULT", this->Architectures);
+ }
+
+ if (this->Architectures.empty()) {
// With no ARCHS we use ONLY_ACTIVE_ARCH and possibly a
// platform-specific default ARCHS placeholder value.
// Look up the arch that Xcode chooses in this case.