[Cmake-commits] CMake branch, next, updated. v3.2.1-1366-g0134ce0
Stephen Kelly
steveire at gmail.com
Wed Apr 1 15:06:50 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 0134ce0e8c10e23d1d33fca8b65d817ff07a05e5 (commit)
via 9c59989b400c535791e71d561f556596f33f145e (commit)
from ae11f760358c8bd05f95eb81118bd08bd88aa416 (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=0134ce0e8c10e23d1d33fca8b65d817ff07a05e5
commit 0134ce0e8c10e23d1d33fca8b65d817ff07a05e5
Merge: ae11f76 9c59989
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Apr 1 15:06:49 2015 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Apr 1 15:06:49 2015 -0400
Merge topic 'clean-up-cmMakefile' into next
9c59989b Revert "cmMakefile: Remove ProjectName member."
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9c59989b400c535791e71d561f556596f33f145e
commit 9c59989b400c535791e71d561f556596f33f145e
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Apr 1 21:05:28 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Apr 1 21:06:06 2015 +0200
Revert "cmMakefile: Remove ProjectName member."
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 8ab89c3..6fbcaeb 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -117,6 +117,7 @@ cmMakefile::cmMakefile(const cmMakefile& mf): Internal(new Internals)
this->cmHomeDirectory = mf.cmHomeDirectory;
this->HomeOutputDirectory = mf.HomeOutputDirectory;
this->cmCurrentListFile = mf.cmCurrentListFile;
+ this->ProjectName = mf.ProjectName;
this->Targets = mf.Targets;
this->SourceFiles = mf.SourceFiles;
this->Tests = mf.Tests;
@@ -247,7 +248,7 @@ void cmMakefile::Print() const
std::cout << " this->cmHomeDirectory; " <<
this->cmHomeDirectory << std::endl;
std::cout << " this->ProjectName; "
- << this->GetDefinition("PROJECT_NAME") << std::endl;
+ << this->ProjectName << std::endl;
this->PrintStringVector("this->LinkDirectories", this->LinkDirectories);
#if defined(CMAKE_BUILD_WITH_CMAKE)
for( std::vector<cmSourceGroup>::const_iterator i =
@@ -1658,6 +1659,9 @@ void cmMakefile::InitializeFromParent()
// link directories
this->LinkDirectories = parent->LinkDirectories;
+ // the initial project name
+ this->ProjectName = parent->ProjectName;
+
// Copy include regular expressions.
this->IncludeFileRegularExpression = parent->IncludeFileRegularExpression;
this->ComplainFileRegularExpression = parent->ComplainFileRegularExpression;
@@ -1989,6 +1993,12 @@ void cmMakefile::RemoveCacheDefinition(const std::string& name)
this->GetCacheManager()->RemoveCacheEntry(name);
}
+void cmMakefile::SetProjectName(const char* p)
+{
+ this->ProjectName = p;
+}
+
+
void cmMakefile::AddGlobalLinkInformation(const std::string& name,
cmTarget& target)
{
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index ff53987..ebfe508 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -334,12 +334,16 @@ public:
void RemoveCacheDefinition(const std::string& name);
/**
+ * Specify the name of the project for this build.
+ */
+ void SetProjectName(const char*);
+
+ /**
* Get the name of the project for this build.
*/
const char* GetProjectName() const
{
- const char* def = this->GetDefinition("PROJECT_NAME");
- return def ? def : "";
+ return this->ProjectName.c_str();
}
/** Get the configurations to be generated. */
diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx
index ae64789..61c0133 100644
--- a/Source/cmProjectCommand.cxx
+++ b/Source/cmProjectCommand.cxx
@@ -20,6 +20,7 @@ bool cmProjectCommand
this->SetError("PROJECT called with incorrect number of arguments");
return false;
}
+ this->Makefile->SetProjectName(args[0].c_str());
std::string bindir = args[0];
bindir += "_BINARY_DIR";
-----------------------------------------------------------------------
Summary of changes:
Source/cmMakefile.cxx | 12 +++++++++++-
Source/cmMakefile.h | 8 ++++++--
Source/cmProjectCommand.cxx | 1 +
3 files changed, 18 insertions(+), 3 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list