summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorEvan Wilde <etceterawilde@gmail.com>2023-12-19 03:26:41 (GMT)
committerEvan Wilde <etceterawilde@gmail.com>2023-12-19 03:42:53 (GMT)
commitd31b48816c4f01b4338a6044aa8f0d3575e19f70 (patch)
tree72fa48b569b1ab743d0cd8cd924152fdc13e87dd /Source
parentdaf8da8c8007229490dbdf0b2cd32f0b575f3c00 (diff)
downloadCMake-d31b48816c4f01b4338a6044aa8f0d3575e19f70.zip
CMake-d31b48816c4f01b4338a6044aa8f0d3575e19f70.tar.gz
CMake-d31b48816c4f01b4338a6044aa8f0d3575e19f70.tar.bz2
Swift/Ninja: Fix missing OFM in CMP0157 OLD behavior
The CMP0157 old behavior omitted the output-file-map after the Swift build split because we stopped calling `EmitSwiftDependencyInfo` when we could not split the build because we didn't call `WriteObjectBuildStatement`. If we can't split the build, then we still need to include the OFM information to not break incremental builds.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 732593f..2cb1284 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -1142,7 +1142,8 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatements(
std::vector<cmSourceFile const*> swiftSources;
for (cmSourceFile const* sf : objectSources) {
- if (sf->GetLanguage() == "Swift") {
+ if (this->GetLocalGenerator()->IsSplitSwiftBuild() &&
+ sf->GetLanguage() == "Swift") {
swiftSources.push_back(sf);
} else {
this->WriteObjectBuildStatement(sf, config, fileConfig,