mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
Ninja: support SWIFT_MODULE_NAME property
Add a new `SWIFT_MODULE_NAME` property that defaults to the target name. This can be adjusted via `set_target_properties`. This is needed as otherwise, the first source file determines the module name. Issue: #18800
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user