diff options
author | Brad King <brad.king@kitware.com> | 2024-01-16 16:44:47 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2024-01-16 16:44:58 (GMT) |
commit | eee631bb8a94a5b39c01c11671183538497824d7 (patch) | |
tree | 138812085c5819d615de7efdd763381965aa3f76 /Source | |
parent | 267c480b248319f3d0ad522798d536117770a359 (diff) | |
parent | 9950a69f269d3c661847836a6ad3e6a77450bed9 (diff) | |
download | CMake-eee631bb8a94a5b39c01c11671183538497824d7.zip CMake-eee631bb8a94a5b39c01c11671183538497824d7.tar.gz CMake-eee631bb8a94a5b39c01c11671183538497824d7.tar.bz2 |
Merge topic 'ewilde/swift-escapism'
9950a69f26 Swift/Ninja: Fix compile commands output file path
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9150
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 9bc292c..45ed0ab 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -2362,6 +2362,8 @@ void cmNinjaTargetGenerator::ExportSwiftObjectCompileCommand( return this->LocalGenerator->ConvertToOutputFormat( srcFilename, cmOutputConverter::SHELL); }; + auto escapedModuleObjectFilename = + this->ConvertToNinjaPath(moduleObjectFilename); cmRulePlaceholderExpander::RuleVariables compileObjectVars; compileObjectVars.Language = "Swift"; @@ -2390,11 +2392,12 @@ void cmNinjaTargetGenerator::ExportSwiftObjectCompileCommand( for (cmSourceFile const* sf : moduleSourceFiles) { std::string const sourceFilename = this->GetCompiledSourceNinjaPath(sf); - std::string objectFilename = moduleObjectFilename; + std::string objectFilename = escapedModuleObjectFilename; if (!singleOutput) { // If it's not single-output, each source file gets a separate object - objectFilename = this->GetObjectFilePath(sf, outputConfig); + objectFilename = + this->ConvertToNinjaPath(this->GetObjectFilePath(sf, outputConfig)); } compileObjectVars.Objects = objectFilename.c_str(); |