diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2020-03-07 18:15:29 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2020-03-09 13:11:22 (GMT) |
commit | 65b3848de0ae6251858dd12c97bff8110cb845f1 (patch) | |
tree | 43a7c665fd2fb3345673f8004fd80fd67ce7cade /Source | |
parent | 6857aaaa062f3526fc54438472fe676bcda5842e (diff) | |
download | CMake-65b3848de0ae6251858dd12c97bff8110cb845f1.zip CMake-65b3848de0ae6251858dd12c97bff8110cb845f1.tar.gz CMake-65b3848de0ae6251858dd12c97bff8110cb845f1.tar.bz2 |
Swift: support Ninja Multi-Config
Enable support for multi-configuration builds using Ninja when building
Swift.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmNinjaNormalTargetGenerator.cxx | 6 | ||||
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 0a6da91..885703f 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -873,11 +873,11 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement( cmOutputConverter::SHELL); }(vars["SWIFT_MODULE_NAME"]); + const std::string map = cmStrCat(gt->GetSupportDirectory(), '/', config, + '/', "output-file-map.json"); vars["SWIFT_OUTPUT_FILE_MAP"] = this->GetLocalGenerator()->ConvertToOutputFormat( - this->ConvertToNinjaPath(gt->GetSupportDirectory() + - "/output-file-map.json"), - cmOutputConverter::SHELL); + this->ConvertToNinjaPath(map), cmOutputConverter::SHELL); vars["SWIFT_SOURCES"] = [this, config]() -> std::string { std::vector<cmSourceFile const*> sources; diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 0e74678..abf12f8 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -953,7 +953,8 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatements( if (!this->Configs[config].SwiftOutputMap.empty()) { std::string const mapFilePath = - this->GeneratorTarget->GetSupportDirectory() + "/output-file-map.json"; + cmStrCat(this->GeneratorTarget->GetSupportDirectory(), '/', config, '/', + "output-file-map.json"); std::string const targetSwiftDepsPath = [this, config]() -> std::string { cmGeneratorTarget const* target = this->GeneratorTarget; if (const char* name = target->GetProperty("Swift_DEPENDENCIES_FILE")) { |