mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-26 18:58:34 -06:00
Ninja/Swift: Remove redundant calls to ConvertToNinjaPath
`GetSourceFilePath` already handles converting to a Ninja path.
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -1575,8 +1575,7 @@ void cmNinjaTargetGenerator::WriteTargetDependInfo(std::string const& lang,
|
||||
void cmNinjaTargetGenerator::EmitSwiftDependencyInfo(
|
||||
cmSourceFile const* source, const std::string& config)
|
||||
{
|
||||
std::string const sourceFilePath =
|
||||
this->ConvertToNinjaPath(this->GetSourceFilePath(source));
|
||||
std::string const sourceFilePath = this->GetSourceFilePath(source);
|
||||
std::string const objectFilePath =
|
||||
this->ConvertToNinjaPath(this->GetObjectFilePath(source, config));
|
||||
std::string const swiftDepsPath = [source, objectFilePath]() -> std::string {
|
||||
|
||||
Reference in New Issue
Block a user