summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmNinjaTargetGenerator.cxx7
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)) {