summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-01-29 15:32:30 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-01-29 15:32:38 (GMT)
commit38ee7db2ac34902e1fac58c2763ac72a7b2adb75 (patch)
treea5e45bbfc85a479ba43bb0a7986376a67afb83cc /Source/cmGlobalNinjaGenerator.cxx
parentc46a26a4c9c097fd34c1b83282ad51ca82cd824d (diff)
parent15f6606abdf383c72461651c8cd4ab01cd3da175 (diff)
downloadCMake-38ee7db2ac34902e1fac58c2763ac72a7b2adb75.zip
CMake-38ee7db2ac34902e1fac58c2763ac72a7b2adb75.tar.gz
CMake-38ee7db2ac34902e1fac58c2763ac72a7b2adb75.tar.bz2
Merge topic 'mixed-mode-multi-arch'
15f6606abd Swift: disallow multiple `CMAKE_OSX_ARCHITECTURES` with Swift Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4283
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index d093c43..f6613d0 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -684,6 +684,17 @@ bool cmGlobalNinjaGenerator::CheckLanguages(
if (cmContains(languages, "Fortran")) {
return this->CheckFortran(mf);
}
+ if (cmContains(languages, "Swift")) {
+ const std::string architectures =
+ mf->GetSafeDefinition("CMAKE_OSX_ARCHITECTURES");
+ if (architectures.find_first_of(';') != std::string::npos) {
+ mf->IssueMessage(MessageType::FATAL_ERROR,
+ "multiple values for CMAKE_OSX_ARCHITECTURES not "
+ "supported with Swift");
+ cmSystemTools::SetFatalErrorOccured();
+ return false;
+ }
+ }
return true;
}