|
|
@@ -1566,6 +1566,17 @@ void cmLocalGenerator::AddLanguageFlags(std::string& flags,
|
|
|
this->AddConfigVariableFlags(flags, cmStrCat("CMAKE_", lang, "_FLAGS"),
|
|
|
config);
|
|
|
|
|
|
+ if (lang == "Swift") {
|
|
|
+ if (const char* v = target->GetProperty("Swift_LANGUAGE_VERSION")) {
|
|
|
+ if (cmSystemTools::VersionCompare(
|
|
|
+ cmSystemTools::OP_GREATER_EQUAL,
|
|
|
+ this->Makefile->GetDefinition("CMAKE_Swift_COMPILER_VERSION"),
|
|
|
+ "4.2")) {
|
|
|
+ this->AppendFlags(flags, "-swift-version " + std::string(v));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// Add MSVC runtime library flags. This is activated by the presence
|
|
|
// of a default selection whether or not it is overridden by a property.
|
|
|
const char* msvcRuntimeLibraryDefault =
|