Ninja: Simplify computation of GLOBAL_TARGET outputs
In cmGlobalNinjaGenerator::AppendTargetOutputs we previously handled GLOBAL_TARGET outputs specially in order to avoid adding directory components to the output. However, this is not necessary because cmNinjaTargetGenerator::New already filters out copies of these targets that are not at the top level. Instead we can simply follow the same output computation code path as UTILITY targets.
This commit is contained in:
parent
4689d16e8a
commit
a88c99f1bc
|
@ -867,6 +867,7 @@ void cmGlobalNinjaGenerator::AppendTargetOutputs(
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case cmState::OBJECT_LIBRARY:
|
case cmState::OBJECT_LIBRARY:
|
||||||
|
case cmState::GLOBAL_TARGET:
|
||||||
case cmState::UTILITY: {
|
case cmState::UTILITY: {
|
||||||
std::string path =
|
std::string path =
|
||||||
target->GetLocalGenerator()->GetCurrentBinaryDirectory() +
|
target->GetLocalGenerator()->GetCurrentBinaryDirectory() +
|
||||||
|
@ -875,12 +876,6 @@ void cmGlobalNinjaGenerator::AppendTargetOutputs(
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case cmState::GLOBAL_TARGET:
|
|
||||||
// Always use the target in HOME instead of an unused duplicate in a
|
|
||||||
// subdirectory.
|
|
||||||
outputs.push_back(this->NinjaOutputPath(target->GetName()));
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue