cmState: Record buildsystem target names in each directory
Maintain in the directory state the list of target names added to be built. These are normal, non-imported targets (but do include INTERFACE libraries).
This commit is contained in:
parent
5c87b92b1b
commit
089868a244
|
@ -1930,6 +1930,7 @@ cmTarget* cmMakefile::AddNewTarget(cmState::TargetType type,
|
||||||
name, cmTarget(name, type, cmTarget::VisibilityNormal, this)))
|
name, cmTarget(name, type, cmTarget::VisibilityNormal, this)))
|
||||||
.first;
|
.first;
|
||||||
this->GetGlobalGenerator()->IndexTarget(&it->second);
|
this->GetGlobalGenerator()->IndexTarget(&it->second);
|
||||||
|
this->GetStateSnapshot().GetDirectory().AddNormalTargetName(name);
|
||||||
return &it->second;
|
return &it->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -94,6 +94,8 @@ struct cmState::BuildsystemDirectoryStateType
|
||||||
std::vector<std::string> CompileOptions;
|
std::vector<std::string> CompileOptions;
|
||||||
std::vector<cmListFileBacktrace> CompileOptionsBacktraces;
|
std::vector<cmListFileBacktrace> CompileOptionsBacktraces;
|
||||||
|
|
||||||
|
std::vector<std::string> NormalTargetNames;
|
||||||
|
|
||||||
std::string ProjectName;
|
std::string ProjectName;
|
||||||
|
|
||||||
cmPropertyMap Properties;
|
cmPropertyMap Properties;
|
||||||
|
@ -324,6 +326,7 @@ cmState::Snapshot cmState::Reset()
|
||||||
it->CompileOptions.clear();
|
it->CompileOptions.clear();
|
||||||
it->CompileOptionsBacktraces.clear();
|
it->CompileOptionsBacktraces.clear();
|
||||||
it->DirectoryEnd = pos;
|
it->DirectoryEnd = pos;
|
||||||
|
it->NormalTargetNames.clear();
|
||||||
it->Properties.clear();
|
it->Properties.clear();
|
||||||
it->Children.clear();
|
it->Children.clear();
|
||||||
}
|
}
|
||||||
|
@ -1733,6 +1736,11 @@ std::vector<std::string> cmState::Directory::GetPropertyKeys() const
|
||||||
return keys;
|
return keys;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cmState::Directory::AddNormalTargetName(std::string const& name)
|
||||||
|
{
|
||||||
|
this->DirectoryState->NormalTargetNames.push_back(name);
|
||||||
|
}
|
||||||
|
|
||||||
bool operator==(const cmState::Snapshot& lhs, const cmState::Snapshot& rhs)
|
bool operator==(const cmState::Snapshot& lhs, const cmState::Snapshot& rhs)
|
||||||
{
|
{
|
||||||
return lhs.Position == rhs.Position;
|
return lhs.Position == rhs.Position;
|
||||||
|
|
|
@ -175,6 +175,8 @@ public:
|
||||||
bool GetPropertyAsBool(const std::string& prop) const;
|
bool GetPropertyAsBool(const std::string& prop) const;
|
||||||
std::vector<std::string> GetPropertyKeys() const;
|
std::vector<std::string> GetPropertyKeys() const;
|
||||||
|
|
||||||
|
void AddNormalTargetName(std::string const& name);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void ComputeRelativePathTopSource();
|
void ComputeRelativePathTopSource();
|
||||||
void ComputeRelativePathTopBinary();
|
void ComputeRelativePathTopBinary();
|
||||||
|
|
Loading…
Reference in New Issue