mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-25 10:18:34 -06:00
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:
@@ -4134,6 +4134,7 @@ cmTarget* cmMakefile::AddImportedTarget(const std::string& name,
|
|||||||
// Add to the set of available imported targets.
|
// Add to the set of available imported targets.
|
||||||
this->ImportedTargets[name] = target.get();
|
this->ImportedTargets[name] = target.get();
|
||||||
this->GetGlobalGenerator()->IndexTarget(target.get());
|
this->GetGlobalGenerator()->IndexTarget(target.get());
|
||||||
|
this->GetStateSnapshot().GetDirectory().AddImportedTargetName(name);
|
||||||
|
|
||||||
// Transfer ownership to this cmMakefile object.
|
// Transfer ownership to this cmMakefile object.
|
||||||
this->ImportedTargetsOwned.push_back(std::move(target));
|
this->ImportedTargetsOwned.push_back(std::move(target));
|
||||||
|
|||||||
@@ -286,6 +286,7 @@ cmStateSnapshot cmState::Reset()
|
|||||||
it->LinkDirectoriesBacktraces.clear();
|
it->LinkDirectoriesBacktraces.clear();
|
||||||
it->DirectoryEnd = pos;
|
it->DirectoryEnd = pos;
|
||||||
it->NormalTargetNames.clear();
|
it->NormalTargetNames.clear();
|
||||||
|
it->ImportedTargetNames.clear();
|
||||||
it->Properties.Clear();
|
it->Properties.Clear();
|
||||||
it->Children.clear();
|
it->Children.clear();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -546,3 +546,8 @@ void cmStateDirectory::AddNormalTargetName(std::string const& name)
|
|||||||
{
|
{
|
||||||
this->DirectoryState->NormalTargetNames.push_back(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;
|
std::vector<std::string> GetPropertyKeys() const;
|
||||||
|
|
||||||
void AddNormalTargetName(std::string const& name);
|
void AddNormalTargetName(std::string const& name);
|
||||||
|
void AddImportedTargetName(std::string const& name);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
cmLinkedTree<cmStateDetail::BuildsystemDirectoryStateType>::iterator
|
cmLinkedTree<cmStateDetail::BuildsystemDirectoryStateType>::iterator
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ struct cmStateDetail::BuildsystemDirectoryStateType
|
|||||||
std::vector<cmListFileBacktrace> LinkDirectoriesBacktraces;
|
std::vector<cmListFileBacktrace> LinkDirectoriesBacktraces;
|
||||||
|
|
||||||
std::vector<std::string> NormalTargetNames;
|
std::vector<std::string> NormalTargetNames;
|
||||||
|
std::vector<std::string> ImportedTargetNames;
|
||||||
|
|
||||||
std::string ProjectName;
|
std::string ProjectName;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user