diff options
author | Brad King <brad.king@kitware.com> | 2016-09-26 13:06:29 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-09-26 13:06:29 (GMT) |
commit | c6f07d06c610a9b1e6062d70ffc78c04bdf48ee4 (patch) | |
tree | 15a6961de923535d8695806223cec28cf8078388 /Source | |
parent | d57a6493fc667f8a6ffa9fad2566a0cbea785ec5 (diff) | |
parent | b35568f3f9f9b8f4b5b2a2e6f4d524540980c3ae (diff) | |
download | CMake-c6f07d06c610a9b1e6062d70ffc78c04bdf48ee4.zip CMake-c6f07d06c610a9b1e6062d70ffc78c04bdf48ee4.tar.gz CMake-c6f07d06c610a9b1e6062d70ffc78c04bdf48ee4.tar.bz2 |
Merge topic 'xcode-swift-version'
b35568f3 Xcode: Add option to set Swift language version
49d50ad4 Xcode: Port rudimentary Swift support to Xcode 8
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 997f46c..0d5de06 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -2996,6 +2996,15 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects( buildSettings->AddAttribute("GCC_VERSION", this->CreateString(this->GeneratorToolset)); } + if (this->GetLanguageEnabled("Swift")) { + std::string swiftVersion = "2.3"; + if (const char* vers = this->CurrentMakefile->GetDefinition( + "CMAKE_Swift_LANGUAGE_VERSION")) { + swiftVersion = vers; + } + buildSettings->AddAttribute("SWIFT_VERSION", + this->CreateString(swiftVersion)); + } std::string symroot = root->GetCurrentBinaryDirectory(); symroot += "/build"; |