Ninja: Simplify generation of custom target logical path
In `AppendTargetOutputs` we generate a logical build target name for each UTILITY command. Simplify the logic to avoid testing the result of `ConvertToNinjaPath`.
This commit is contained in:
parent
7d2a0aa76c
commit
5ca72750c8
|
@ -836,15 +836,10 @@ void cmGlobalNinjaGenerator::AppendTargetOutputs(
|
|||
}
|
||||
case cmState::OBJECT_LIBRARY:
|
||||
case cmState::UTILITY: {
|
||||
std::string path = this->ConvertToNinjaPath(
|
||||
target->GetLocalGenerator()->GetCurrentBinaryDirectory());
|
||||
if (path.empty() || path == ".")
|
||||
outputs.push_back(target->GetName());
|
||||
else {
|
||||
path += "/";
|
||||
path += target->GetName();
|
||||
outputs.push_back(path);
|
||||
}
|
||||
std::string path =
|
||||
target->GetLocalGenerator()->GetCurrentBinaryDirectory() +
|
||||
std::string("/") + target->GetName();
|
||||
outputs.push_back(this->ConvertToNinjaPath(path));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue