[Cmake-commits] CMake branch, next, updated. v3.3.1-2440-g7a826b2
Stephen Kelly
steveire at gmail.com
Tue Aug 25 13:58:03 EDT 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 7a826b20db6797d1d49ca9851ee744c94dd9374e (commit)
via 637c56b4e0ce0205f3f28a670881aad07320ff17 (commit)
via b3f2299e0600f3488aaeb78ebf66d1108201ea17 (commit)
via 6ce940ac9701c93be01ed169c6bd23b22e04782f (commit)
via e8c0341d86e3f2b9658dfc594641f9ba1b29165b (commit)
from f23c21d028ecebc11ac724ea663d783eb477f4f8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7a826b20db6797d1d49ca9851ee744c94dd9374e
commit 7a826b20db6797d1d49ca9851ee744c94dd9374e
Merge: f23c21d 637c56b
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Aug 25 13:58:02 2015 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Aug 25 13:58:02 2015 -0400
Merge topic 'cmState-ProjectName' into next
637c56b4 cmGlobalGenerator: Implement FillProjectMap in terms of cmState.
b3f2299e cmState: Move ProjectName from cmMakefile.
6ce940ac cmMakefile: Use std::string in ProjectName API.
e8c0341d cmMakefile: Out-of-line GetProjectName.
diff --cc Source/cmState.cxx
index a401265,6cd58b6..b30c10b
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@@ -75,9 -75,9 +75,11 @@@ struct cmState::BuildsystemDirectorySta
std::vector<std::string> CompileOptions;
std::vector<cmListFileBacktrace> CompileOptionsBacktraces;
+ std::string ProjectName;
+
cmPropertyMap Properties;
+
+ std::vector<cmState::Snapshot> Children;
};
cmState::cmState(cmake* cm)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=637c56b4e0ce0205f3f28a670881aad07320ff17
commit 637c56b4e0ce0205f3f28a670881aad07320ff17
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 09:41:11 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Aug 25 19:57:44 2015 +0200
cmGlobalGenerator: Implement FillProjectMap in terms of cmState.
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 503c455..17bafbe 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2102,18 +2102,19 @@ void cmGlobalGenerator::FillProjectMap()
for(i = 0; i < this->LocalGenerators.size(); ++i)
{
// for each local generator add all projects
- cmLocalGenerator *lg = this->LocalGenerators[i];
+ cmState::Snapshot snp = this->LocalGenerators[i]->GetStateSnapshot();
std::string name;
do
{
- if (name != lg->GetMakefile()->GetProjectName())
+ std::string snpProjName = snp.GetProjectName();
+ if (name != snpProjName)
{
- name = lg->GetMakefile()->GetProjectName();
+ name = snpProjName;
this->ProjectMap[name].push_back(this->LocalGenerators[i]);
}
- lg = lg->GetParent();
+ snp = snp.GetBuildsystemDirectoryParent();
}
- while (lg);
+ while (snp.IsValid());
}
}
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b3f2299e0600f3488aaeb78ebf66d1108201ea17
commit b3f2299e0600f3488aaeb78ebf66d1108201ea17
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 09:41:06 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Aug 25 19:57:42 2015 +0200
cmState: Move ProjectName from cmMakefile.
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index abdd767..dbf41cc 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -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,
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index dfd3e19..81bb510 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -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)
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 53fdae0..6cd58b6 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -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)
diff --git a/Source/cmState.h b/Source/cmState.h
index e503cd2..c3ff4e8 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -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,
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6ce940ac9701c93be01ed169c6bd23b22e04782f
commit 6ce940ac9701c93be01ed169c6bd23b22e04782f
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 10:57:31 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Aug 25 19:55:34 2015 +0200
cmMakefile: Use std::string in ProjectName API.
diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx
index 591a2cd..7da334e 100644
--- a/Source/cmCPluginAPI.cxx
+++ b/Source/cmCPluginAPI.cxx
@@ -115,7 +115,9 @@ void CCONV cmAddCacheDefinition(void *arg, const char* name,
const char* CCONV cmGetProjectName(void *arg)
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
- return mf->GetProjectName();
+ static std::string name;
+ name = mf->GetProjectName();
+ return name.c_str();
}
const char* CCONV cmGetHomeDirectory(void *arg)
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 73911a5..abdd767 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2044,12 +2044,12 @@ void cmMakefile::RemoveCacheDefinition(const std::string& name)
this->GetState()->RemoveCacheEntry(name);
}
-void cmMakefile::SetProjectName(const char* p)
+void cmMakefile::SetProjectName(std::string const& p)
{
this->ProjectName = p;
}
-const char* cmMakefile::GetProjectName() const
+std::string cmMakefile::GetProjectName() const
{
return this->ProjectName.c_str();
}
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 959f0e7..dfd3e19 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -274,12 +274,12 @@ public:
/**
* Specify the name of the project for this build.
*/
- void SetProjectName(const char*);
+ void SetProjectName(std::string const& name);
/**
* Get the name of the project for this build.
*/
- const char* GetProjectName() const;
+ std::string GetProjectName() const;
/** Get the configurations to be generated. */
std::string GetConfigurations(std::vector<std::string>& configs,
diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx
index 46d7e01..7123125 100644
--- a/Source/cmProjectCommand.cxx
+++ b/Source/cmProjectCommand.cxx
@@ -20,7 +20,7 @@ bool cmProjectCommand
this->SetError("PROJECT called with incorrect number of arguments");
return false;
}
- this->Makefile->SetProjectName(args[0].c_str());
+ this->Makefile->SetProjectName(args[0]);
std::string bindir = args[0];
bindir += "_BINARY_DIR";
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e8c0341d86e3f2b9658dfc594641f9ba1b29165b
commit e8c0341d86e3f2b9658dfc594641f9ba1b29165b
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Aug 2 10:56:33 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Aug 25 19:55:32 2015 +0200
cmMakefile: Out-of-line GetProjectName.
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 2296d5a..73911a5 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2049,6 +2049,10 @@ void cmMakefile::SetProjectName(const char* p)
this->ProjectName = p;
}
+const char* cmMakefile::GetProjectName() const
+{
+ return this->ProjectName.c_str();
+}
void cmMakefile::AddGlobalLinkInformation(const std::string& name,
cmTarget& target)
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 055170a..959f0e7 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -279,10 +279,7 @@ public:
/**
* Get the name of the project for this build.
*/
- const char* GetProjectName() const
- {
- return this->ProjectName.c_str();
- }
+ const char* GetProjectName() const;
/** Get the configurations to be generated. */
std::string GetConfigurations(std::vector<std::string>& configs,
-----------------------------------------------------------------------
Summary of changes:
Source/cmCPluginAPI.cxx | 4 +++-
Source/cmGlobalGenerator.cxx | 11 ++++++-----
Source/cmMakefile.cxx | 10 +++++++---
Source/cmMakefile.h | 9 ++-------
Source/cmProjectCommand.cxx | 2 +-
Source/cmState.cxx | 12 ++++++++++++
Source/cmState.h | 3 +++
7 files changed, 34 insertions(+), 17 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list