summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-05-20 18:21:56 (GMT)
committerBrad King <brad.king@kitware.com>2021-05-25 14:48:25 (GMT)
commitef553410e24959dac8413a7f2277d42530fbc0f7 (patch)
tree6f4157aa2545b7e0c6f736adcab722ead0b591df /Source/cmNinjaNormalTargetGenerator.cxx
parent7cf4dfcf787bc67c884a1c64a3b78c41bca720bb (diff)
downloadCMake-ef553410e24959dac8413a7f2277d42530fbc0f7.zip
CMake-ef553410e24959dac8413a7f2277d42530fbc0f7.tar.gz
CMake-ef553410e24959dac8413a7f2277d42530fbc0f7.tar.bz2
Ninja/Swift: Remove redundant calls to ConvertToNinjaPath
`GetSourceFilePath` already handles converting to a Ninja path.
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 1b514b8..e443981 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -1072,9 +1072,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement(
cmLocalGenerator const* LocalGen = this->GetLocalGenerator();
for (const auto& source : sources) {
oss << " "
- << LocalGen->ConvertToOutputFormat(
- this->ConvertToNinjaPath(this->GetSourceFilePath(source)),
- cmOutputConverter::SHELL);
+ << LocalGen->ConvertToOutputFormat(this->GetSourceFilePath(source),
+ cmOutputConverter::SHELL);
}
return oss.str();
}();
@@ -1094,8 +1093,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement(
for (const auto& source : sources) {
linkBuild.Outputs.push_back(
this->ConvertToNinjaPath(this->GetObjectFilePath(source, config)));
- linkBuild.ExplicitDeps.push_back(
- this->ConvertToNinjaPath(this->GetSourceFilePath(source)));
+ linkBuild.ExplicitDeps.emplace_back(this->GetSourceFilePath(source));
}
linkBuild.Outputs.push_back(vars["SWIFT_MODULE"]);
} else {