diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmMakefile.cxx | 1 | ||||
-rw-r--r-- | Source/cmState.cxx | 1 | ||||
-rw-r--r-- | Source/cmStateDirectory.cxx | 5 | ||||
-rw-r--r-- | Source/cmStateDirectory.h | 1 | ||||
-rw-r--r-- | Source/cmStatePrivate.h | 1 |
5 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 908b3f0..d2d34f9 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -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)); diff --git a/Source/cmState.cxx b/Source/cmState.cxx index d97762b..0b8a64b 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -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(); } diff --git a/Source/cmStateDirectory.cxx b/Source/cmStateDirectory.cxx index 9ae2861..76201cd 100644 --- a/Source/cmStateDirectory.cxx +++ b/Source/cmStateDirectory.cxx @@ -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); +} diff --git a/Source/cmStateDirectory.h b/Source/cmStateDirectory.h index ce00dbb..b8abccb 100644 --- a/Source/cmStateDirectory.h +++ b/Source/cmStateDirectory.h @@ -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 diff --git a/Source/cmStatePrivate.h b/Source/cmStatePrivate.h index a437ce2..6f475f2 100644 --- a/Source/cmStatePrivate.h +++ b/Source/cmStatePrivate.h @@ -83,6 +83,7 @@ struct cmStateDetail::BuildsystemDirectoryStateType std::vector<cmListFileBacktrace> LinkDirectoriesBacktraces; std::vector<std::string> NormalTargetNames; + std::vector<std::string> ImportedTargetNames; std::string ProjectName; |