diff options
author | Brad King <brad.king@kitware.com> | 2019-01-25 13:04:58 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-01-25 13:06:01 (GMT) |
commit | 15bc4a25e50d18ba081f31ffd8fc4724b83460b5 (patch) | |
tree | 024d8ed14ffe49102ed6406a8b5a9a5f06b53454 /Source | |
parent | 9a2bddb7042485a35329cf8644f8da1cbfd2398f (diff) | |
parent | de13c55d74e0e95aa3799ba132db668212721776 (diff) | |
download | CMake-15bc4a25e50d18ba081f31ffd8fc4724b83460b5.zip CMake-15bc4a25e50d18ba081f31ffd8fc4724b83460b5.tar.gz CMake-15bc4a25e50d18ba081f31ffd8fc4724b83460b5.tar.bz2 |
Merge topic 'swift'
de13c55d74 Ninja: support `SWIFT_MODULE_NAME` property
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2850
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index c959a04..edb0ef3 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -919,7 +919,12 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement( } vars["SWIFT_AUXILIARY_SOURCES"] = aux_sources; - vars["SWIFT_MODULE_NAME"] = this->GeneratorTarget->GetName(); + if (const char* name = + this->GeneratorTarget->GetProperty("SWIFT_MODULE_NAME")) { + vars["SWIFT_MODULE_NAME"] = name; + } else { + vars["SWIFT_MODULE_NAME"] = this->GeneratorTarget->GetName(); + } } if (!this->NeedDepTypeMSVC(language)) { |