cmState: Record imported target names in each directory
Model the change after commit 089868a244
(cmState: Record buildsystem
target names in each directory, 2016-09-16, v3.7.0-rc1~79^2~3).
This commit is contained in:
parent
5fd68d3ef7
commit
ea6d338ea1
@ -4134,6 +4134,7 @@ cmTarget* cmMakefile::AddImportedTarget(const std::string& name,
|
||||
// Add to the set of available imported targets.
|
||||
this->ImportedTargets[name] = target.get();
|
||||
this->GetGlobalGenerator()->IndexTarget(target.get());
|
||||
this->GetStateSnapshot().GetDirectory().AddImportedTargetName(name);
|
||||
|
||||
// Transfer ownership to this cmMakefile object.
|
||||
this->ImportedTargetsOwned.push_back(std::move(target));
|
||||
|
@ -286,6 +286,7 @@ cmStateSnapshot cmState::Reset()
|
||||
it->LinkDirectoriesBacktraces.clear();
|
||||
it->DirectoryEnd = pos;
|
||||
it->NormalTargetNames.clear();
|
||||
it->ImportedTargetNames.clear();
|
||||
it->Properties.Clear();
|
||||
it->Children.clear();
|
||||
}
|
||||
|
@ -546,3 +546,8 @@ void cmStateDirectory::AddNormalTargetName(std::string const& name)
|
||||
{
|
||||
this->DirectoryState->NormalTargetNames.push_back(name);
|
||||
}
|
||||
|
||||
void cmStateDirectory::AddImportedTargetName(std::string const& name)
|
||||
{
|
||||
this->DirectoryState->ImportedTargetNames.emplace_back(name);
|
||||
}
|
||||
|
@ -81,6 +81,7 @@ public:
|
||||
std::vector<std::string> GetPropertyKeys() const;
|
||||
|
||||
void AddNormalTargetName(std::string const& name);
|
||||
void AddImportedTargetName(std::string const& name);
|
||||
|
||||
private:
|
||||
cmLinkedTree<cmStateDetail::BuildsystemDirectoryStateType>::iterator
|
||||
|
@ -83,6 +83,7 @@ struct cmStateDetail::BuildsystemDirectoryStateType
|
||||
std::vector<cmListFileBacktrace> LinkDirectoriesBacktraces;
|
||||
|
||||
std::vector<std::string> NormalTargetNames;
|
||||
std::vector<std::string> ImportedTargetNames;
|
||||
|
||||
std::string ProjectName;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user