An update will be applied January 25th, between 12PM and 1:00PM EST (UTC -5:00). The site may be slow during that time.

Commit b3f2299e authored by Stephen Kelly's avatar Stephen Kelly
Browse files

cmState: Move ProjectName from cmMakefile.

parent 6ce940ac
......@@ -1525,7 +1525,7 @@ void cmMakefile::InitializeFromParent(cmMakefile* parent)
parent->GetProperty("LINK_DIRECTORIES"));
// the initial project name
this->ProjectName = parent->ProjectName;
this->SetProjectName(parent->GetProjectName());
// Copy include regular expressions.
this->ComplainFileRegularExpression = parent->ComplainFileRegularExpression;
......@@ -2046,12 +2046,12 @@ void cmMakefile::RemoveCacheDefinition(const std::string& name)
void cmMakefile::SetProjectName(std::string const& p)
{
this->ProjectName = p;
this->StateSnapshot.SetProjectName(p);
}
std::string cmMakefile::GetProjectName() const
{
return this->ProjectName.c_str();
return this->StateSnapshot.GetProjectName();
}
void cmMakefile::AddGlobalLinkInformation(const std::string& name,
......
......@@ -810,8 +810,6 @@ protected:
mutable std::set<cmListFileContext> CMP0054ReportedIds;
std::string ProjectName; // project name
// libraries, classes, and executables
mutable cmTargets Targets;
#if defined(CMAKE_BUILD_WITH_CMAKE)
......
......@@ -75,6 +75,8 @@ struct cmState::BuildsystemDirectoryStateType
std::vector<std::string> CompileOptions;
std::vector<cmListFileBacktrace> CompileOptionsBacktraces;
std::string ProjectName;
cmPropertyMap Properties;
};
......@@ -1312,6 +1314,16 @@ cmState::Directory cmState::Snapshot::GetDirectory() const
return Directory(this->Position->BuildSystemDirectory, *this);
}
void cmState::Snapshot::SetProjectName(const std::string& name)
{
this->Position->BuildSystemDirectory->ProjectName = name;
}
std::string cmState::Snapshot::GetProjectName() const
{
return this->Position->BuildSystemDirectory->ProjectName;
}
cmState::Directory::Directory(
cmLinkedTree<BuildsystemDirectoryStateType>::iterator iter,
const cmState::Snapshot& snapshot)
......
......@@ -86,6 +86,9 @@ public:
Directory GetDirectory() const;
void SetProjectName(std::string const& name);
std::string GetProjectName() const;
struct StrictWeakOrder
{
bool operator()(const cmState::Snapshot& lhs,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment