mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-01 19:30:13 -06:00
cmGlobalGenerator: Constify GetTargetDirectDepends
It should only be called for targets whose dependencies are already computed.
This commit is contained in:
@@ -3389,9 +3389,12 @@ cmValue cmGlobalGenerator::GetDebuggerWorkingDirectory(
|
||||
}
|
||||
|
||||
cmGlobalGenerator::TargetDependSet const&
|
||||
cmGlobalGenerator::GetTargetDirectDepends(cmGeneratorTarget const* target)
|
||||
cmGlobalGenerator::GetTargetDirectDepends(
|
||||
cmGeneratorTarget const* target) const
|
||||
{
|
||||
return this->TargetDependencies[target];
|
||||
auto i = this->TargetDependencies.find(target);
|
||||
assert(i != this->TargetDependencies.end());
|
||||
return i->second;
|
||||
}
|
||||
|
||||
bool cmGlobalGenerator::TargetOrderIndexLess(cmGeneratorTarget const* l,
|
||||
|
||||
@@ -525,7 +525,7 @@ public:
|
||||
// what targets does the specified target depend on directly
|
||||
// via a target_link_libraries or add_dependencies
|
||||
TargetDependSet const& GetTargetDirectDepends(
|
||||
cmGeneratorTarget const* target);
|
||||
cmGeneratorTarget const* target) const;
|
||||
|
||||
// Return true if target 'l' occurs before 'r' in a global ordering
|
||||
// of targets that respects inter-target dependencies.
|
||||
|
||||
Reference in New Issue
Block a user