summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2020-01-25 16:49:23 (GMT)
committerSaleem Abdulrasool <compnerd@compnerd.org>2020-01-28 18:13:28 (GMT)
commit15f6606abdf383c72461651c8cd4ab01cd3da175 (patch)
tree8a6cf734672ec5320aa7b58b6565d3b2fb759885 /Source/cmGlobalNinjaGenerator.cxx
parent03e2757c665f285f3a75d75841473bc7afb2bbc9 (diff)
downloadCMake-15f6606abdf383c72461651c8cd4ab01cd3da175.zip
CMake-15f6606abdf383c72461651c8cd4ab01cd3da175.tar.gz
CMake-15f6606abdf383c72461651c8cd4ab01cd3da175.tar.bz2
Swift: disallow multiple `CMAKE_OSX_ARCHITECTURES` with Swift
This disallows the use of multiple values in `CMAKE_OSX_ARCHITECTURES` with Swift which does not support FAT compilation.
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 2dd89e3..25bb453 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -660,6 +660,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;
}