mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-02 20:29:49 -05:00
Ninja: Avoid re-linking a Swift executable on every build
Swift doesn't emit swiftmodules for executables, so we shouldn't put it in dependency graph. Ninja sees the "missing" dependency and always tries to rebuild/re-link the target.
This commit is contained in:
@@ -1112,7 +1112,9 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement(
|
||||
this->GetObjectFilePath(source, config));
|
||||
}
|
||||
}
|
||||
linkBuild.Outputs.push_back(vars["SWIFT_MODULE"]);
|
||||
if (targetType != cmStateEnums::EXECUTABLE) {
|
||||
linkBuild.Outputs.push_back(vars["SWIFT_MODULE"]);
|
||||
}
|
||||
} else {
|
||||
linkBuild.ExplicitDeps = this->GetObjects(config);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user