[Cmake-commits] CMake branch, next, updated. v3.2.2-2796-g339105e
Stephen Kelly
steveire at gmail.com
Sat May 16 01:51:42 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 339105e26389bdd7fe38dfc28ab8f4d89e77a4b7 (commit)
via a261ab6622d55899d9f116b63102e0225eeec562 (commit)
via 5071ccbe4ff187365d2e4b01a7be8ce7dbcd4f1f (commit)
via 7d6b86ff199a86819a18fa620689e7aaa6ed3be0 (commit)
via 074daad8a6340ad5133019395b3ca6e65032cf16 (commit)
via 5ffbe5dc1a4dcab4616909727f439032aaa48608 (commit)
via 8fc108ed1454a5fb87208d81aea3de632b8b5d5b (commit)
from 58ed6bf4ea9f6aa4fd5119c53b5b2b86922c7afa (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=339105e26389bdd7fe38dfc28ab8f4d89e77a4b7
commit 339105e26389bdd7fe38dfc28ab8f4d89e77a4b7
Merge: 58ed6bf a261ab6
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat May 16 01:51:40 2015 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat May 16 01:51:40 2015 -0400
Merge topic 'clean-up-cmMakefile' into next
a261ab66 cmMakefile: Don't expect the VarStack iterator to support size().
5071ccbe cmMakefile: Remove redundant condition.
7d6b86ff cmMakefile: Rename method to something more appropriate.
074daad8 cmMakefile: Make the public ReadListFile method take one param.
5ffbe5dc cmMakefile: Remove CurrentListFile member.
8fc108ed cmMakefile: Port CurrentListFile clients to GetDefinition.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a261ab6622d55899d9f116b63102e0225eeec562
commit a261ab6622d55899d9f116b63102e0225eeec562
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat May 16 07:29:36 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sat May 16 07:50:12 2015 +0200
cmMakefile: Don't expect the VarStack iterator to support size().
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index ec6142e..3cebdfb 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -113,9 +113,8 @@ public:
bool RaiseScope(std::string const& var, const char* varDef, cmMakefile* mf)
{
- assert(this->VarStack.size() > 0);
-
std::list<cmDefinitions>::reverse_iterator it = this->VarStack.rbegin();
+ assert(it != this->VarStack.rend());
++it;
if(it == this->VarStack.rend())
{
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5071ccbe4ff187365d2e4b01a7be8ce7dbcd4f1f
commit 5071ccbe4ff187365d2e4b01a7be8ce7dbcd4f1f
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat May 2 10:25:13 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sat May 16 07:50:11 2015 +0200
cmMakefile: Remove redundant condition.
As this is called in the constructor, the definition will never be already
set.
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 5a2264e..ec6142e 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -238,18 +238,12 @@ cmMakefile::cmMakefile(cmLocalGenerator* localGenerator)
{
const char* dir = this->GetCMakeInstance()->GetHomeDirectory();
this->AddDefinition("CMAKE_SOURCE_DIR", dir);
- if ( !this->GetDefinition("CMAKE_CURRENT_SOURCE_DIR") )
- {
- this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR", dir);
- }
+ this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR", dir);
}
{
const char* dir = this->GetCMakeInstance()->GetHomeOutputDirectory();
this->AddDefinition("CMAKE_BINARY_DIR", dir);
- if ( !this->GetDefinition("CMAKE_CURRENT_BINARY_DIR") )
- {
- this->AddDefinition("CMAKE_CURRENT_BINARY_DIR", dir);
- }
+ this->AddDefinition("CMAKE_CURRENT_BINARY_DIR", dir);
}
}
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7d6b86ff199a86819a18fa620689e7aaa6ed3be0
commit 7d6b86ff199a86819a18fa620689e7aaa6ed3be0
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat May 16 07:30:33 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sat May 16 07:30:33 2015 +0200
cmMakefile: Rename method to something more appropriate.
Allow the name to be used for something more-suitable.
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 526aa3a..5a2264e 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4363,7 +4363,7 @@ void cmMakefile::AddCMakeDependFilesFromUser()
}
}
-std::string cmMakefile::GetListFileStack() const
+std::string cmMakefile::FormatListFileStack() const
{
std::ostringstream tmp;
size_t depth = this->ListFileStack.size();
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 1b9867f..a20bd56 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -592,7 +592,7 @@ public:
{ this->ListFiles.push_back(file);}
void AddCMakeDependFilesFromUser();
- std::string GetListFileStack() const;
+ std::string FormatListFileStack() const;
/**
* Get the current context backtrace.
diff --git a/Source/cmTryRunCommand.cxx b/Source/cmTryRunCommand.cxx
index 3cd92cb..b9ffe5e 100644
--- a/Source/cmTryRunCommand.cxx
+++ b/Source/cmTryRunCommand.cxx
@@ -375,7 +375,7 @@ void cmTryRunCommand::DoNotRunExecutable(const std::string& runArgs,
comment += "Run arguments : ";
comment += runArgs;
comment += "\n";
- comment += " Called from: " + this->Makefile->GetListFileStack();
+ comment += " Called from: " + this->Makefile->FormatListFileStack();
cmsys::SystemTools::ReplaceString(comment, "\n", "\n# ");
file << comment << "\n\n";
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index d82087f..bfd79eb 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -130,7 +130,7 @@ static std::string cmakemainGetStack(void *clientdata)
cmMakefile* mf=cmakemainGetMakefile(clientdata);
if (mf)
{
- msg = mf->GetListFileStack();
+ msg = mf->FormatListFileStack();
if (!msg.empty())
{
msg = "\n Called from: " + msg;
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=074daad8a6340ad5133019395b3ca6e65032cf16
commit 074daad8a6340ad5133019395b3ca6e65032cf16
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri May 15 00:09:53 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sat May 16 07:13:32 2015 +0200
cmMakefile: Make the public ReadListFile method take one param.
Make the existing method a private overload. All external callers
invoke the method with only one argument.
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 1e2b29c..526aa3a 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -612,12 +612,14 @@ bool cmMakefile::ReadDependentFile(const char* listfile, bool noPolicyScope)
{
this->AddDefinition("CMAKE_PARENT_LIST_FILE",
this->GetDefinition("CMAKE_CURRENT_LIST_FILE"));
- return this->ReadListFile(listfile, noPolicyScope);
+ return this->ReadListFile(listfile, noPolicyScope, false);
+}
+
+bool cmMakefile::ReadListFile(const char* listfile)
+{
+ return this->ReadListFile(listfile, true, false);
}
-//----------------------------------------------------------------------------
-// Parse the given CMakeLists.txt file executing all commands
-//
bool cmMakefile::ReadListFile(const char* listfile,
bool noPolicyScope,
bool requireProjectCommand)
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 082b66c..1b9867f 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -81,12 +81,7 @@ public:
*/
~cmMakefile();
- /**
- * Read and parse a CMakeLists.txt file.
- */
- bool ReadListFile(const char* listfile,
- bool noPolicyScope = true,
- bool requireProjectCommand = false);
+ bool ReadListFile(const char* listfile);
bool ReadDependentFile(const char* listfile, bool noPolicyScope = true);
@@ -914,6 +909,10 @@ private:
cmState::Snapshot StateSnapshot;
+ bool ReadListFile(const char* listfile,
+ bool noPolicyScope,
+ bool requireProjectCommand);
+
bool ReadListFileInternal(const char* filenametoread,
bool noPolicyScope,
bool requireProjectCommand);
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5ffbe5dc1a4dcab4616909727f439032aaa48608
commit 5ffbe5dc1a4dcab4616909727f439032aaa48608
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu May 14 23:49:10 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sat May 16 07:13:31 2015 +0200
cmMakefile: Remove CurrentListFile member.
It is never read externally. The CollapseFullPath removed in this commit
is a repeat of a similar call inside ReadListFile.
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index da537f4..1e2b29c 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -603,7 +603,6 @@ void cmMakefile::IncludeScope::EnforceCMP0011()
bool cmMakefile::ProcessBuildsystemFile(const char* listfile)
{
this->AddDefinition("CMAKE_PARENT_LIST_FILE", listfile);
- this->cmCurrentListFile = listfile;
std::string curSrc = this->GetCurrentSourceDirectory();
return this->ReadListFile(listfile, true,
curSrc == this->GetHomeDirectory());
@@ -613,11 +612,7 @@ bool cmMakefile::ReadDependentFile(const char* listfile, bool noPolicyScope)
{
this->AddDefinition("CMAKE_PARENT_LIST_FILE",
this->GetDefinition("CMAKE_CURRENT_LIST_FILE"));
- this->cmCurrentListFile =
- cmSystemTools::CollapseFullPath(listfile,
- this->GetCurrentSourceDirectory());
- return this->ReadListFile(this->cmCurrentListFile.c_str(),
- noPolicyScope);
+ return this->ReadListFile(listfile, noPolicyScope);
}
//----------------------------------------------------------------------------
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index e0eef6f..082b66c 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -435,14 +435,6 @@ public:
void SetCurrentBinaryDirectory(const std::string& dir);
const char* GetCurrentBinaryDirectory() const;
- /* Get the current CMakeLists.txt file that is being processed. This
- * is just used in order to be able to 'branch' from one file to a second
- * transparently */
- const char* GetCurrentListFile() const
- {
- return this->cmCurrentListFile.c_str();
- }
-
//@}
/**
@@ -861,8 +853,6 @@ protected:
// Check for a an unused variable
void CheckForUnused(const char* reason, const std::string& name) const;
- std::string cmCurrentListFile;
-
std::string ProjectName; // project name
// libraries, classes, and executables
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8fc108ed1454a5fb87208d81aea3de632b8b5d5b
commit 8fc108ed1454a5fb87208d81aea3de632b8b5d5b
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu May 14 23:47:40 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sat May 16 07:13:31 2015 +0200
cmMakefile: Port CurrentListFile clients to GetDefinition.
There is no need to store this as a member variable.
diff --git a/Source/cmExtraQbsGenerator.cxx b/Source/cmExtraQbsGenerator.cxx
index 4cc4650..c15f8da 100644
--- a/Source/cmExtraQbsGenerator.cxx
+++ b/Source/cmExtraQbsGenerator.cxx
@@ -182,7 +182,9 @@ void cmExtraQbsGenerator::AppendSources(cmGeneratedFileStream &fout,
std::vector<cmSourceFile *> genSources;
std::vector<cmSourceFile *>::const_iterator itr = sources.begin();
fout << "\t\t\tfiles: [\n"
- << "\t\t\t\t\"" << t.GetMakefile()->GetCurrentListFile() << "\",\n";
+ << "\t\t\t\t\""
+ << t.GetMakefile()->GetDefinition("CMAKE_CURRENT_LIST_FILE")
+ << "\",\n";
for (; itr != sources.end(); ++itr)
{
if (!(*itr)->GetPropertyAsBool("GENERATED"))
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index f1f1202..bcae486 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -305,8 +305,8 @@ void cmLocalNinjaGenerator::WriteProcessedMakefile(std::ostream& os)
cmGlobalNinjaGenerator::WriteDivider(os);
os
<< "# Write statements declared in CMakeLists.txt:" << std::endl
- << "# " << this->Makefile->GetCurrentListFile() << std::endl
- ;
+ << "# "
+ << this->Makefile->GetDefinition("CMAKE_CURRENT_LIST_FILE") << std::endl;
if(this->IsRootMakefile())
os << "# Which is the root file." << std::endl;
cmGlobalNinjaGenerator::WriteDivider(os);
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 7b8d3af..da537f4 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -611,7 +611,8 @@ bool cmMakefile::ProcessBuildsystemFile(const char* listfile)
bool cmMakefile::ReadDependentFile(const char* listfile, bool noPolicyScope)
{
- this->AddDefinition("CMAKE_PARENT_LIST_FILE", this->GetCurrentListFile());
+ this->AddDefinition("CMAKE_PARENT_LIST_FILE",
+ this->GetDefinition("CMAKE_CURRENT_LIST_FILE"));
this->cmCurrentListFile =
cmSystemTools::CollapseFullPath(listfile,
this->GetCurrentSourceDirectory());
-----------------------------------------------------------------------
Summary of changes:
Source/cmExtraQbsGenerator.cxx | 4 +++-
Source/cmLocalNinjaGenerator.cxx | 4 ++--
Source/cmMakefile.cxx | 33 ++++++++++++---------------------
Source/cmMakefile.h | 23 ++++++-----------------
Source/cmTryRunCommand.cxx | 2 +-
Source/cmakemain.cxx | 2 +-
6 files changed, 25 insertions(+), 43 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list