summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
authorEvan Wilde <etceterawilde@gmail.com>2023-12-21 18:26:38 (GMT)
committerEvan Wilde <etceterawilde@gmail.com>2024-01-08 17:11:27 (GMT)
commita6a5c433005be3cceab05f088dbd8fe8ffce3540 (patch)
treef5f5fd37a2bb8deedff63b4864c5de45b4cfa01d /Source/cmNinjaTargetGenerator.cxx
parent1f66051983ef0bdefa5de139fa9013830a4c3047 (diff)
downloadCMake-a6a5c433005be3cceab05f088dbd8fe8ffce3540.zip
CMake-a6a5c433005be3cceab05f088dbd8fe8ffce3540.tar.gz
CMake-a6a5c433005be3cceab05f088dbd8fe8ffce3540.tar.bz2
Swift/Ninja: Add support for response files
Adding support for `CMAKE_NINJA_FORCE_RESPONSE_FILE` with Swift. Issue: #25490 Fixes: #25563
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index bc75a95..7b08865 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -2017,6 +2017,7 @@ void cmNinjaTargetGenerator::WriteSwiftObjectBuildStatement(
std::string const targetObjectFilename = this->ConvertToNinjaPath(cmStrCat(
objectDir, '/', moduleName,
this->GetGlobalGenerator()->GetLanguageOutputExtension(language)));
+ objBuild.RspFile = cmStrCat(targetObjectFilename, ".swift.rsp");
if (isSingleOutput) {
this->LocalGenerator->AppendFlags(vars["FLAGS"],
@@ -2076,7 +2077,8 @@ void cmNinjaTargetGenerator::WriteSwiftObjectBuildStatement(
// Write object build
this->GetGlobalGenerator()->WriteBuild(this->GetImplFileStream(fileConfig),
- objBuild);
+ objBuild,
+ this->ForceResponseFile() ? -1 : 0);
}
void cmNinjaTargetGenerator::WriteTargetDependInfo(std::string const& lang,