|
|
@@ -2423,6 +2423,18 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
|
|
|
this->AppendDefines(ppDefs, targetDefines);
|
|
|
buildSettings->AddAttribute("GCC_PREPROCESSOR_DEFINITIONS",
|
|
|
ppDefs.CreateList());
|
|
|
+ if (languages.count("Swift")) {
|
|
|
+ if (this->XcodeVersion < 80) {
|
|
|
+ std::string defineString;
|
|
|
+ std::set<std::string> defines(targetDefines.begin(),
|
|
|
+ targetDefines.end());
|
|
|
+ this->CurrentLocalGenerator->JoinDefines(defines, defineString, "Swift");
|
|
|
+ cflags["Swift"] += " " + defineString;
|
|
|
+ } else {
|
|
|
+ buildSettings->AddAttribute("SWIFT_ACTIVE_COMPILATION_CONDITIONS",
|
|
|
+ ppDefs.CreateList());
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
std::string extraLinkOptionsVar;
|
|
|
std::string extraLinkOptions;
|