[Cmake-commits] CMake branch, next, updated. v3.3.0-rc2-555-g8a2406a

Stephen Kelly steveire at gmail.com
Sun Jun 21 14:12:43 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  8a2406a57e01585050c4d451a209eeb16d83b106 (commit)
       via  81eb2c58a17f7e34cda79897ea7dec24bf798dd2 (commit)
       via  5c837686287eb22e73af76d2ab7f32d5bf8cb9ec (commit)
       via  c10ab014344e693a65d7cfbfb9b4e0f8a8b155f9 (commit)
       via  3404f8a081a03441c6747de50f2155ae28115c07 (commit)
       via  a1858136c28326212d15cfd0a4412281f46b9cb0 (commit)
       via  ad47e6e5bc4822dc5bc9d82ae1d7590aee4ece95 (commit)
       via  254be613b803816a918c12d7d7eca40a7c9f7c09 (commit)
       via  826b6e68184759cda496f0073a8f59b2155cfdaf (commit)
       via  e53072d638c2cca3258ffccbec75bb5c70d34a3f (commit)
       via  b7166afa6d385c4f0a0610f43ea00c8e5613a003 (commit)
       via  27f229b9707f3a87c3ed0d469b5b2d08c80076c5 (commit)
       via  9166b49d70746dcd36e6e891c78734b559e0fccf (commit)
       via  384a0dba63b166d94a199b12f104e53496a3302a (commit)
       via  5e24ff17a22b780947e98eabc1d25320104f7b21 (commit)
       via  d5aaa2b96f7d93aaa8e11e8d5e9cf0c2b1739290 (commit)
       via  fff3c6cd1c49ba1aa8a256e26294db65710c9d18 (commit)
       via  a6e661b848fc180b03e7d72739c9a4a077a97e3f (commit)
       via  fe38bb2c29ab4273cfefb1b343b80388bea2893e (commit)
       via  ac10fc0958c94e17d89a686d1addae0ac18dc648 (commit)
       via  155ef535974ab9e78e98da00b63f31bd5c848bd0 (commit)
       via  4fa99b9922cf811b6f3cb2fac17d9b58a33c0d6e (commit)
      from  295f35d4a302e844c9acf7277122d9d2308f262b (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=8a2406a57e01585050c4d451a209eeb16d83b106
commit 8a2406a57e01585050c4d451a209eeb16d83b106
Merge: 295f35d 81eb2c5
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 21 14:12:41 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Jun 21 14:12:41 2015 -0400

    Merge topic 'clean-up-ReadListFile' into next
    
    81eb2c58 cmMakefile: Simplify filename handling.
    5c837686 cmMakefile: Make the IncludeScope more responsible.
    c10ab014 cmMakefile: Move IncludeScope.
    3404f8a0 cmMakefile: Move ListFile parsing responsibility out of internal method.
    a1858136 cmMakefile: Rename parameter.
    ad47e6e5 cmMakefile: Inline ReadListFileInternal into caller.
    254be613 cmMakefile: Move resource management into the IncludeScope.
    826b6e68 cmMakefile: Move IncludeScope to ReadDependentFile.
    e53072d6 cmMakefile: Move IncludeScope instance.
    b7166afa cmMakefile: Remove File from IncludeScope.
    27f229b9 cmMakefile: Move include scope out of ReadListFileInternal.
    9166b49d cmMakefile: Change order of raii scopes.
    384a0dba cmMakefile: Simplify condition handling.
    5e24ff17 cmMakefile: Split file handling from execution.
    d5aaa2b9 cmMakefile: Move check for unused variables.
    fff3c6cd cmMakefile: Move a container population.
    ...


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=81eb2c58a17f7e34cda79897ea7dec24bf798dd2
commit 81eb2c58a17f7e34cda79897ea7dec24bf798dd2
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 21 20:10:02 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 20:10:52 2015 +0200

    cmMakefile: Simplify filename handling.
    
    This method has only one caller.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index dee290c..7faf67a 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -536,21 +536,17 @@ bool cmMakefile::ProcessBuildsystemFile(const char* filename)
 {
   this->AddDefinition("CMAKE_PARENT_LIST_FILE", filename);
   std::string curSrc = this->GetCurrentSourceDirectory();
-  std::string filenametoread =
-    cmSystemTools::CollapseFullPath(filename,
-                                    this->GetCurrentSourceDirectory());
 
-  this->ListFileStack.push_back(filenametoread);
+  this->ListFileStack.push_back(filename);
 
   cmListFile listFile;
-  if (!listFile.ParseFile(filenametoread.c_str(),
-                          curSrc == this->GetHomeDirectory(), this))
+  if (!listFile.ParseFile(filename, curSrc == this->GetHomeDirectory(), this))
     {
     return false;
     }
 
   this->PushPolicyBarrier();
-  this->ReadListFile(listFile, filenametoread);
+  this->ReadListFile(listFile, filename);
   this->PopPolicyBarrier(!cmSystemTools::GetFatalErrorOccured());
   this->EnforceDirectoryLevelRules();
   return true;

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5c837686287eb22e73af76d2ab7f32d5bf8cb9ec
commit 5c837686287eb22e73af76d2ab7f32d5bf8cb9ec
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 21 20:09:13 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 20:10:52 2015 +0200

    cmMakefile: Make the IncludeScope more responsible.
    
    It is now responsible for all resource management when
    including a file.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 744e848..dee290c 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -409,7 +409,8 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff,
 class cmMakefile::IncludeScope
 {
 public:
-  IncludeScope(cmMakefile* mf, bool noPolicyScope);
+  IncludeScope(cmMakefile* mf, std::string const& filenametoread,
+               bool noPolicyScope);
   ~IncludeScope();
   void Quiet() { this->ReportError = false; }
 private:
@@ -422,6 +423,7 @@ private:
 
 //----------------------------------------------------------------------------
 cmMakefile::IncludeScope::IncludeScope(cmMakefile* mf,
+                                       std::string const& filenametoread,
                                        bool noPolicyScope):
   Makefile(mf), NoPolicyScope(noPolicyScope),
   CheckCMP0011(false), ReportError(true)
@@ -457,6 +459,7 @@ cmMakefile::IncludeScope::IncludeScope(cmMakefile* mf,
 
   // The included file cannot pop our policy scope.
   this->Makefile->PushPolicyBarrier();
+  this->Makefile->ListFileStack.push_back(filenametoread);
 }
 
 //----------------------------------------------------------------------------
@@ -561,8 +564,7 @@ bool cmMakefile::ReadDependentFile(const char* filename, bool noPolicyScope)
     cmSystemTools::CollapseFullPath(filename,
                                     this->GetCurrentSourceDirectory());
 
-  IncludeScope incScope(this, noPolicyScope);
-  this->ListFileStack.push_back(filenametoread);
+  IncludeScope incScope(this, filenametoread, noPolicyScope);
 
   cmListFile listFile;
   if (!listFile.ParseFile(filenametoread.c_str(), false, this))

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c10ab014344e693a65d7cfbfb9b4e0f8a8b155f9
commit c10ab014344e693a65d7cfbfb9b4e0f8a8b155f9
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 21 20:08:30 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 20:10:52 2015 +0200

    cmMakefile: Move IncludeScope.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 32767a3..744e848 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -561,14 +561,15 @@ bool cmMakefile::ReadDependentFile(const char* filename, bool noPolicyScope)
     cmSystemTools::CollapseFullPath(filename,
                                     this->GetCurrentSourceDirectory());
 
+  IncludeScope incScope(this, noPolicyScope);
   this->ListFileStack.push_back(filenametoread);
 
   cmListFile listFile;
   if (!listFile.ParseFile(filenametoread.c_str(), false, this))
     {
+    incScope.Quiet();
     return false;
     }
-  IncludeScope incScope(this, noPolicyScope);
   this->ReadListFile(listFile, filenametoread);
   if(cmSystemTools::GetFatalErrorOccured())
     {

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3404f8a081a03441c6747de50f2155ae28115c07
commit 3404f8a081a03441c6747de50f2155ae28115c07
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 21 20:07:40 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 20:10:51 2015 +0200

    cmMakefile: Move ListFile parsing responsibility out of internal method.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 62d4c66..32767a3 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -533,39 +533,52 @@ bool cmMakefile::ProcessBuildsystemFile(const char* filename)
 {
   this->AddDefinition("CMAKE_PARENT_LIST_FILE", filename);
   std::string curSrc = this->GetCurrentSourceDirectory();
+  std::string filenametoread =
+    cmSystemTools::CollapseFullPath(filename,
+                                    this->GetCurrentSourceDirectory());
+
+  this->ListFileStack.push_back(filenametoread);
+
+  cmListFile listFile;
+  if (!listFile.ParseFile(filenametoread.c_str(),
+                          curSrc == this->GetHomeDirectory(), this))
+    {
+    return false;
+    }
+
   this->PushPolicyBarrier();
-  bool result = this->ReadListFile(filename,
-                                   curSrc == this->GetHomeDirectory());
+  this->ReadListFile(listFile, filenametoread);
   this->PopPolicyBarrier(!cmSystemTools::GetFatalErrorOccured());
   this->EnforceDirectoryLevelRules();
-  return result;
+  return true;
 }
 
 bool cmMakefile::ReadDependentFile(const char* filename, bool noPolicyScope)
 {
   this->AddDefinition("CMAKE_PARENT_LIST_FILE",
                       this->GetDefinition("CMAKE_CURRENT_LIST_FILE"));
+  std::string filenametoread =
+    cmSystemTools::CollapseFullPath(filename,
+                                    this->GetCurrentSourceDirectory());
+
+  this->ListFileStack.push_back(filenametoread);
+
+  cmListFile listFile;
+  if (!listFile.ParseFile(filenametoread.c_str(), false, this))
+    {
+    return false;
+    }
   IncludeScope incScope(this, noPolicyScope);
-  bool result = this->ReadListFile(filename, false);
+  this->ReadListFile(listFile, filenametoread);
   if(cmSystemTools::GetFatalErrorOccured())
     {
     incScope.Quiet();
     }
-  return result;
+  return true;
 }
 
 bool cmMakefile::ReadListFile(const char* filename)
 {
-  this->PushPolicyBarrier();
-  bool result = this->ReadListFile(filename, false);
-  this->PopPolicyBarrier(!cmSystemTools::GetFatalErrorOccured());
-  this->ListFileStack.pop_back();
-  return result;
-}
-
-bool cmMakefile::ReadListFile(const char* filename,
-                              bool requireProjectCommand)
-{
   std::string filenametoread =
     cmSystemTools::CollapseFullPath(filename,
                                     this->GetCurrentSourceDirectory());
@@ -573,12 +586,21 @@ bool cmMakefile::ReadListFile(const char* filename,
   this->ListFileStack.push_back(filenametoread);
 
   cmListFile listFile;
-  if (!listFile.ParseFile(filenametoread.c_str(),
-                          requireProjectCommand, this))
+  if (!listFile.ParseFile(filenametoread.c_str(), false, this))
     {
     return false;
     }
 
+  this->PushPolicyBarrier();
+  this->ReadListFile(listFile, filenametoread);
+  this->PopPolicyBarrier(!cmSystemTools::GetFatalErrorOccured());
+  this->ListFileStack.pop_back();
+  return true;
+}
+
+void cmMakefile::ReadListFile(cmListFile const& listFile,
+                              std::string const& filenametoread)
+{
   // add this list file to the list of dependencies
   this->ListFiles.push_back(filenametoread);
 
@@ -625,8 +647,6 @@ bool cmMakefile::ReadListFile(const char* filename,
   this->MarkVariableAsUsed("CMAKE_PARENT_LIST_FILE");
   this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_FILE");
   this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_DIR");
-
-  return true;
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 24b4bd0..271cfd6 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -914,8 +914,8 @@ private:
 
   cmState::Snapshot StateSnapshot;
 
-  bool ReadListFile(const char* filename,
-                    bool requireProjectCommand);
+  void ReadListFile(cmListFile const& listFile,
+                    const std::string& filenametoread);
 
   bool ParseDefineFlag(std::string const& definition, bool remove);
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a1858136c28326212d15cfd0a4412281f46b9cb0
commit a1858136c28326212d15cfd0a4412281f46b9cb0
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 21 20:02:16 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 20:10:51 2015 +0200

    cmMakefile: Rename parameter.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index c4400d1..62d4c66 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -529,24 +529,24 @@ void cmMakefile::IncludeScope::EnforceCMP0011()
     }
 }
 
-bool cmMakefile::ProcessBuildsystemFile(const char* listfile)
+bool cmMakefile::ProcessBuildsystemFile(const char* filename)
 {
-  this->AddDefinition("CMAKE_PARENT_LIST_FILE", listfile);
+  this->AddDefinition("CMAKE_PARENT_LIST_FILE", filename);
   std::string curSrc = this->GetCurrentSourceDirectory();
   this->PushPolicyBarrier();
-  bool result = this->ReadListFile(listfile,
+  bool result = this->ReadListFile(filename,
                                    curSrc == this->GetHomeDirectory());
   this->PopPolicyBarrier(!cmSystemTools::GetFatalErrorOccured());
   this->EnforceDirectoryLevelRules();
   return result;
 }
 
-bool cmMakefile::ReadDependentFile(const char* listfile, bool noPolicyScope)
+bool cmMakefile::ReadDependentFile(const char* filename, bool noPolicyScope)
 {
   this->AddDefinition("CMAKE_PARENT_LIST_FILE",
                       this->GetDefinition("CMAKE_CURRENT_LIST_FILE"));
   IncludeScope incScope(this, noPolicyScope);
-  bool result = this->ReadListFile(listfile, false);
+  bool result = this->ReadListFile(filename, false);
   if(cmSystemTools::GetFatalErrorOccured())
     {
     incScope.Quiet();
@@ -554,20 +554,20 @@ bool cmMakefile::ReadDependentFile(const char* listfile, bool noPolicyScope)
   return result;
 }
 
-bool cmMakefile::ReadListFile(const char* listfile)
+bool cmMakefile::ReadListFile(const char* filename)
 {
   this->PushPolicyBarrier();
-  bool result = this->ReadListFile(listfile, false);
+  bool result = this->ReadListFile(filename, false);
   this->PopPolicyBarrier(!cmSystemTools::GetFatalErrorOccured());
   this->ListFileStack.pop_back();
   return result;
 }
 
-bool cmMakefile::ReadListFile(const char* listfile,
+bool cmMakefile::ReadListFile(const char* filename,
                               bool requireProjectCommand)
 {
   std::string filenametoread =
-    cmSystemTools::CollapseFullPath(listfile,
+    cmSystemTools::CollapseFullPath(filename,
                                     this->GetCurrentSourceDirectory());
 
   this->ListFileStack.push_back(filenametoread);
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 8ea6e13..24b4bd0 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -79,11 +79,11 @@ public:
    */
   ~cmMakefile();
 
-  bool ReadListFile(const char* listfile);
+  bool ReadListFile(const char* filename);
 
-  bool ReadDependentFile(const char* listfile, bool noPolicyScope = true);
+  bool ReadDependentFile(const char* filename, bool noPolicyScope = true);
 
-  bool ProcessBuildsystemFile(const char* listfile);
+  bool ProcessBuildsystemFile(const char* filename);
 
   /**
    * Add a function blocker to this makefile
@@ -914,7 +914,7 @@ private:
 
   cmState::Snapshot StateSnapshot;
 
-  bool ReadListFile(const char* listfile,
+  bool ReadListFile(const char* filename,
                     bool requireProjectCommand);
 
   bool ParseDefineFlag(std::string const& definition, bool remove);

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ad47e6e5bc4822dc5bc9d82ae1d7590aee4ece95
commit ad47e6e5bc4822dc5bc9d82ae1d7590aee4ece95
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 21 19:57:15 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 20:10:50 2015 +0200

    cmMakefile: Inline ReadListFileInternal into caller.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index b02cfc8..c4400d1 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -595,22 +595,6 @@ bool cmMakefile::ReadListFile(const char* listfile,
   this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_FILE");
   this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_DIR");
 
-  this->ReadListFileInternal(listFile);
-  this->CheckForUnusedVariables();
-
-  this->AddDefinition("CMAKE_PARENT_LIST_FILE", currentParentFile.c_str());
-  this->AddDefinition("CMAKE_CURRENT_LIST_FILE", currentFile.c_str());
-  this->AddDefinition("CMAKE_CURRENT_LIST_DIR",
-                      cmSystemTools::GetFilenamePath(currentFile).c_str());
-  this->MarkVariableAsUsed("CMAKE_PARENT_LIST_FILE");
-  this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_FILE");
-  this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_DIR");
-
-  return true;
-}
-
-void cmMakefile::ReadListFileInternal(cmListFile const& listFile)
-{
   // Enforce balanced blocks (if/endif, function/endfunction, etc.).
   LexicalPushPop lexScope(this);
 
@@ -632,6 +616,17 @@ void cmMakefile::ReadListFileInternal(cmListFile const& listFile)
       break;
       }
     }
+  this->CheckForUnusedVariables();
+
+  this->AddDefinition("CMAKE_PARENT_LIST_FILE", currentParentFile.c_str());
+  this->AddDefinition("CMAKE_CURRENT_LIST_FILE", currentFile.c_str());
+  this->AddDefinition("CMAKE_CURRENT_LIST_DIR",
+                      cmSystemTools::GetFilenamePath(currentFile).c_str());
+  this->MarkVariableAsUsed("CMAKE_PARENT_LIST_FILE");
+  this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_FILE");
+  this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_DIR");
+
+  return true;
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 9896d5b..8ea6e13 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -917,8 +917,6 @@ private:
   bool ReadListFile(const char* listfile,
                     bool requireProjectCommand);
 
-  void ReadListFileInternal(cmListFile const& listFile);
-
   bool ParseDefineFlag(std::string const& definition, bool remove);
 
   bool EnforceUniqueDir(const std::string& srcPath,

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=254be613b803816a918c12d7d7eca40a7c9f7c09
commit 254be613b803816a918c12d7d7eca40a7c9f7c09
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 21 19:56:31 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 20:10:50 2015 +0200

    cmMakefile: Move resource management into the IncludeScope.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 87d6e3c..b02cfc8 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -486,6 +486,7 @@ cmMakefile::IncludeScope::~IncludeScope()
       this->EnforceCMP0011();
       }
     }
+  this->Makefile->ListFileStack.pop_back();
 }
 
 //----------------------------------------------------------------------------
@@ -544,16 +545,12 @@ bool cmMakefile::ReadDependentFile(const char* listfile, bool noPolicyScope)
 {
   this->AddDefinition("CMAKE_PARENT_LIST_FILE",
                       this->GetDefinition("CMAKE_CURRENT_LIST_FILE"));
-  bool result = false;
-  {
   IncludeScope incScope(this, noPolicyScope);
-  result = this->ReadListFile(listfile, false);
+  bool result = this->ReadListFile(listfile, false);
   if(cmSystemTools::GetFatalErrorOccured())
     {
     incScope.Quiet();
     }
-  }
-  this->ListFileStack.pop_back();
   return result;
 }
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=826b6e68184759cda496f0073a8f59b2155cfdaf
commit 826b6e68184759cda496f0073a8f59b2155cfdaf
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 21 19:51:46 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 20:10:50 2015 +0200

    cmMakefile: Move IncludeScope to ReadDependentFile.
    
    Add replacement simple push/pop in the other two callers of
    ReadListFile.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 6fee95c..87d6e3c 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -532,8 +532,10 @@ bool cmMakefile::ProcessBuildsystemFile(const char* listfile)
 {
   this->AddDefinition("CMAKE_PARENT_LIST_FILE", listfile);
   std::string curSrc = this->GetCurrentSourceDirectory();
-  bool result = this->ReadListFile(listfile, true,
+  this->PushPolicyBarrier();
+  bool result = this->ReadListFile(listfile,
                                    curSrc == this->GetHomeDirectory());
+  this->PopPolicyBarrier(!cmSystemTools::GetFatalErrorOccured());
   this->EnforceDirectoryLevelRules();
   return result;
 }
@@ -542,24 +544,31 @@ bool cmMakefile::ReadDependentFile(const char* listfile, bool noPolicyScope)
 {
   this->AddDefinition("CMAKE_PARENT_LIST_FILE",
                       this->GetDefinition("CMAKE_CURRENT_LIST_FILE"));
-  bool result = this->ReadListFile(listfile, noPolicyScope, false);
+  bool result = false;
+  {
+  IncludeScope incScope(this, noPolicyScope);
+  result = this->ReadListFile(listfile, false);
+  if(cmSystemTools::GetFatalErrorOccured())
+    {
+    incScope.Quiet();
+    }
+  }
   this->ListFileStack.pop_back();
   return result;
 }
 
 bool cmMakefile::ReadListFile(const char* listfile)
 {
-  bool result = this->ReadListFile(listfile, true, false);
+  this->PushPolicyBarrier();
+  bool result = this->ReadListFile(listfile, false);
+  this->PopPolicyBarrier(!cmSystemTools::GetFatalErrorOccured());
   this->ListFileStack.pop_back();
   return result;
 }
 
 bool cmMakefile::ReadListFile(const char* listfile,
-                              bool noPolicyScope,
                               bool requireProjectCommand)
 {
-  IncludeScope incScope(this, noPolicyScope);
-
   std::string filenametoread =
     cmSystemTools::CollapseFullPath(listfile,
                                     this->GetCurrentSourceDirectory());
@@ -590,10 +599,6 @@ bool cmMakefile::ReadListFile(const char* listfile,
   this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_DIR");
 
   this->ReadListFileInternal(listFile);
-  if(cmSystemTools::GetFatalErrorOccured())
-    {
-    incScope.Quiet();
-    }
   this->CheckForUnusedVariables();
 
   this->AddDefinition("CMAKE_PARENT_LIST_FILE", currentParentFile.c_str());
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 2db7c93..9896d5b 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -915,7 +915,6 @@ private:
   cmState::Snapshot StateSnapshot;
 
   bool ReadListFile(const char* listfile,
-                    bool noPolicyScope,
                     bool requireProjectCommand);
 
   void ReadListFileInternal(cmListFile const& listFile);

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e53072d638c2cca3258ffccbec75bb5c70d34a3f
commit e53072d638c2cca3258ffccbec75bb5c70d34a3f
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 21 19:51:04 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 20:10:49 2015 +0200

    cmMakefile: Move IncludeScope instance.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 0142e6d..6fee95c 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -558,6 +558,8 @@ bool cmMakefile::ReadListFile(const char* listfile,
                               bool noPolicyScope,
                               bool requireProjectCommand)
 {
+  IncludeScope incScope(this, noPolicyScope);
+
   std::string filenametoread =
     cmSystemTools::CollapseFullPath(listfile,
                                     this->GetCurrentSourceDirectory());
@@ -587,7 +589,6 @@ bool cmMakefile::ReadListFile(const char* listfile,
   this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_FILE");
   this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_DIR");
 
-  IncludeScope incScope(this, noPolicyScope);
   this->ReadListFileInternal(listFile);
   if(cmSystemTools::GetFatalErrorOccured())
     {

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b7166afa6d385c4f0a0610f43ea00c8e5613a003
commit b7166afa6d385c4f0a0610f43ea00c8e5613a003
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 21 19:50:18 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 20:10:49 2015 +0200

    cmMakefile: Remove File from IncludeScope.
    
    Get it from the Makefile instead.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 836667c..0142e6d 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -409,12 +409,11 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff,
 class cmMakefile::IncludeScope
 {
 public:
-  IncludeScope(cmMakefile* mf, const char* fname, bool noPolicyScope);
+  IncludeScope(cmMakefile* mf, bool noPolicyScope);
   ~IncludeScope();
   void Quiet() { this->ReportError = false; }
 private:
   cmMakefile* Makefile;
-  const char* File;
   bool NoPolicyScope;
   bool CheckCMP0011;
   bool ReportError;
@@ -422,9 +421,9 @@ private:
 };
 
 //----------------------------------------------------------------------------
-cmMakefile::IncludeScope::IncludeScope(cmMakefile* mf, const char* fname,
+cmMakefile::IncludeScope::IncludeScope(cmMakefile* mf,
                                        bool noPolicyScope):
-  Makefile(mf), File(fname), NoPolicyScope(noPolicyScope),
+  Makefile(mf), NoPolicyScope(noPolicyScope),
   CheckCMP0011(false), ReportError(true)
 {
   if(!this->NoPolicyScope)
@@ -501,7 +500,8 @@ void cmMakefile::IncludeScope::EnforceCMP0011()
       {
       std::ostringstream w;
       w << cmPolicies::GetPolicyWarning(cmPolicies::CMP0011) << "\n"
-        << "The included script\n  " << this->File << "\n"
+        << "The included script\n  "
+        << this->Makefile->ListFileStack.back() << "\n"
         << "affects policy settings.  "
         << "CMake is implying the NO_POLICY_SCOPE option for compatibility, "
         << "so the effects are applied to the including context.";
@@ -513,7 +513,8 @@ void cmMakefile::IncludeScope::EnforceCMP0011()
       {
       std::ostringstream e;
       e << cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0011) << "\n"
-        << "The included script\n  " << this->File << "\n"
+        << "The included script\n  "
+        << this->Makefile->ListFileStack.back() << "\n"
         << "affects policy settings, so it requires this policy to be set.";
       this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
       }
@@ -586,7 +587,7 @@ bool cmMakefile::ReadListFile(const char* listfile,
   this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_FILE");
   this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_DIR");
 
-  IncludeScope incScope(this, filenametoread.c_str(), noPolicyScope);
+  IncludeScope incScope(this, noPolicyScope);
   this->ReadListFileInternal(listFile);
   if(cmSystemTools::GetFatalErrorOccured())
     {

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=27f229b9707f3a87c3ed0d469b5b2d08c80076c5
commit 27f229b9707f3a87c3ed0d469b5b2d08c80076c5
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 21 19:46:03 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 20:10:48 2015 +0200

    cmMakefile: Move include scope out of ReadListFileInternal.
    
    Simplify the ReadListFileInternal API.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 15a3710..836667c 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -586,7 +586,12 @@ bool cmMakefile::ReadListFile(const char* listfile,
   this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_FILE");
   this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_DIR");
 
-  this->ReadListFileInternal(listFile, filenametoread.c_str(), noPolicyScope);
+  IncludeScope incScope(this, filenametoread.c_str(), noPolicyScope);
+  this->ReadListFileInternal(listFile);
+  if(cmSystemTools::GetFatalErrorOccured())
+    {
+    incScope.Quiet();
+    }
   this->CheckForUnusedVariables();
 
   this->AddDefinition("CMAKE_PARENT_LIST_FILE", currentParentFile.c_str());
@@ -600,12 +605,9 @@ bool cmMakefile::ReadListFile(const char* listfile,
   return true;
 }
 
-void cmMakefile::ReadListFileInternal(cmListFile const& listFile,
-                                      const char* filenametoread,
-                                      bool noPolicyScope)
+void cmMakefile::ReadListFileInternal(cmListFile const& listFile)
 {
   // Enforce balanced blocks (if/endif, function/endfunction, etc.).
-  IncludeScope incScope(this, filenametoread, noPolicyScope);
   LexicalPushPop lexScope(this);
 
   // Run the parsed commands.
@@ -618,7 +620,6 @@ void cmMakefile::ReadListFileInternal(cmListFile const& listFile,
       {
       // Exit early due to error.
       lexScope.Quiet();
-      incScope.Quiet();
       break;
       }
     if(status.GetReturnInvoked())
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index b80a1ee..2db7c93 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -918,9 +918,7 @@ private:
                     bool noPolicyScope,
                     bool requireProjectCommand);
 
-  void ReadListFileInternal(cmListFile const& listFile,
-                            const char* filenametoread,
-                            bool noPolicyScope);
+  void ReadListFileInternal(cmListFile const& listFile);
 
   bool ParseDefineFlag(std::string const& definition, bool remove);
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9166b49d70746dcd36e6e891c78734b559e0fccf
commit 9166b49d70746dcd36e6e891c78734b559e0fccf
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 21 19:45:20 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 20:10:48 2015 +0200

    cmMakefile: Change order of raii scopes.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 93a6c08..15a3710 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -605,8 +605,8 @@ void cmMakefile::ReadListFileInternal(cmListFile const& listFile,
                                       bool noPolicyScope)
 {
   // Enforce balanced blocks (if/endif, function/endfunction, etc.).
-  LexicalPushPop lexScope(this);
   IncludeScope incScope(this, filenametoread, noPolicyScope);
+  LexicalPushPop lexScope(this);
 
   // Run the parsed commands.
   const size_t numberFunctions = listFile.Functions.size();

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=384a0dba63b166d94a199b12f104e53496a3302a
commit 384a0dba63b166d94a199b12f104e53496a3302a
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 21 19:44:37 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 20:10:48 2015 +0200

    cmMakefile: Simplify condition handling.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index e3a2e4c..93a6c08 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -564,14 +564,15 @@ bool cmMakefile::ReadListFile(const char* listfile,
   this->ListFileStack.push_back(filenametoread);
 
   cmListFile listFile;
-  bool res = listFile.ParseFile(filenametoread.c_str(),
-                                requireProjectCommand, this);
-  if (res)
+  if (!listFile.ParseFile(filenametoread.c_str(),
+                          requireProjectCommand, this))
     {
-    // add this list file to the list of dependencies
-    this->ListFiles.push_back(filenametoread);
+    return false;
     }
 
+  // add this list file to the list of dependencies
+  this->ListFiles.push_back(filenametoread);
+
   std::string currentParentFile
       = this->GetSafeDefinition("CMAKE_PARENT_LIST_FILE");
   std::string currentFile
@@ -585,13 +586,8 @@ bool cmMakefile::ReadListFile(const char* listfile,
   this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_FILE");
   this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_DIR");
 
-  if (res)
-    {
-    this->ReadListFileInternal(listFile, filenametoread.c_str(),
-                               noPolicyScope);
-
-    this->CheckForUnusedVariables();
-    }
+  this->ReadListFileInternal(listFile, filenametoread.c_str(), noPolicyScope);
+  this->CheckForUnusedVariables();
 
   this->AddDefinition("CMAKE_PARENT_LIST_FILE", currentParentFile.c_str());
   this->AddDefinition("CMAKE_CURRENT_LIST_FILE", currentFile.c_str());
@@ -601,7 +597,7 @@ bool cmMakefile::ReadListFile(const char* listfile,
   this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_FILE");
   this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_DIR");
 
-  return res;
+  return true;
 }
 
 void cmMakefile::ReadListFileInternal(cmListFile const& listFile,

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5e24ff17a22b780947e98eabc1d25320104f7b21
commit 5e24ff17a22b780947e98eabc1d25320104f7b21
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 21 19:43:55 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 20:10:47 2015 +0200

    cmMakefile: Split file handling from execution.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 6b3c7df..e3a2e4c 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -561,6 +561,17 @@ bool cmMakefile::ReadListFile(const char* listfile,
     cmSystemTools::CollapseFullPath(listfile,
                                     this->GetCurrentSourceDirectory());
 
+  this->ListFileStack.push_back(filenametoread);
+
+  cmListFile listFile;
+  bool res = listFile.ParseFile(filenametoread.c_str(),
+                                requireProjectCommand, this);
+  if (res)
+    {
+    // add this list file to the list of dependencies
+    this->ListFiles.push_back(filenametoread);
+    }
+
   std::string currentParentFile
       = this->GetSafeDefinition("CMAKE_PARENT_LIST_FILE");
   std::string currentFile
@@ -574,16 +585,8 @@ bool cmMakefile::ReadListFile(const char* listfile,
   this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_FILE");
   this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_DIR");
 
-  this->ListFileStack.push_back(filenametoread);
-
-  cmListFile listFile;
-  bool res = listFile.ParseFile(filenametoread.c_str(),
-                                requireProjectCommand, this);
   if (res)
     {
-    // add this list file to the list of dependencies
-    this->ListFiles.push_back(filenametoread);
-
     this->ReadListFileInternal(listFile, filenametoread.c_str(),
                                noPolicyScope);
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d5aaa2b96f7d93aaa8e11e8d5e9cf0c2b1739290
commit d5aaa2b96f7d93aaa8e11e8d5e9cf0c2b1739290
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 21 19:43:07 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 20:10:47 2015 +0200

    cmMakefile: Move check for unused variables.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 3c32362..6b3c7df 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -586,6 +586,8 @@ bool cmMakefile::ReadListFile(const char* listfile,
 
     this->ReadListFileInternal(listFile, filenametoread.c_str(),
                                noPolicyScope);
+
+    this->CheckForUnusedVariables();
     }
 
   this->AddDefinition("CMAKE_PARENT_LIST_FILE", currentParentFile.c_str());
@@ -596,11 +598,6 @@ bool cmMakefile::ReadListFile(const char* listfile,
   this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_FILE");
   this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_DIR");
 
-  if (res)
-    {
-    this->CheckForUnusedVariables();
-    }
-
   return res;
 }
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fff3c6cd1c49ba1aa8a256e26294db65710c9d18
commit fff3c6cd1c49ba1aa8a256e26294db65710c9d18
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 21 19:42:21 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 20:10:47 2015 +0200

    cmMakefile: Move a container population.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 08c5a0b..3c32362 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -581,6 +581,9 @@ bool cmMakefile::ReadListFile(const char* listfile,
                                 requireProjectCommand, this);
   if (res)
     {
+    // add this list file to the list of dependencies
+    this->ListFiles.push_back(filenametoread);
+
     this->ReadListFileInternal(listFile, filenametoread.c_str(),
                                noPolicyScope);
     }
@@ -605,11 +608,7 @@ void cmMakefile::ReadListFileInternal(cmListFile const& listFile,
                                       const char* filenametoread,
                                       bool noPolicyScope)
 {
-  // add this list file to the list of dependencies
-  this->ListFiles.push_back( filenametoread);
-
   // Enforce balanced blocks (if/endif, function/endfunction, etc.).
-  {
   LexicalPushPop lexScope(this);
   IncludeScope incScope(this, filenametoread, noPolicyScope);
 
@@ -632,7 +631,6 @@ void cmMakefile::ReadListFileInternal(cmListFile const& listFile,
       break;
       }
     }
-  }
 }
 
 //----------------------------------------------------------------------------

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a6e661b848fc180b03e7d72739c9a4a077a97e3f
commit a6e661b848fc180b03e7d72739c9a4a077a97e3f
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 21 19:38:02 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 20:10:46 2015 +0200

    cmMakefile: Rename variables.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 9a1f7ef..08c5a0b 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -576,12 +576,12 @@ bool cmMakefile::ReadListFile(const char* listfile,
 
   this->ListFileStack.push_back(filenametoread);
 
-  cmListFile cacheFile;
-  bool res = cacheFile.ParseFile(filenametoread.c_str(),
-                                 requireProjectCommand, this);
+  cmListFile listFile;
+  bool res = listFile.ParseFile(filenametoread.c_str(),
+                                requireProjectCommand, this);
   if (res)
     {
-    this->ReadListFileInternal(cacheFile, filenametoread.c_str(),
+    this->ReadListFileInternal(listFile, filenametoread.c_str(),
                                noPolicyScope);
     }
 
@@ -601,7 +601,7 @@ bool cmMakefile::ReadListFile(const char* listfile,
   return res;
 }
 
-void cmMakefile::ReadListFileInternal(cmListFile const& cacheFile,
+void cmMakefile::ReadListFileInternal(cmListFile const& listFile,
                                       const char* filenametoread,
                                       bool noPolicyScope)
 {
@@ -614,11 +614,11 @@ void cmMakefile::ReadListFileInternal(cmListFile const& cacheFile,
   IncludeScope incScope(this, filenametoread, noPolicyScope);
 
   // Run the parsed commands.
-  const size_t numberFunctions = cacheFile.Functions.size();
+  const size_t numberFunctions = listFile.Functions.size();
   for(size_t i =0; i < numberFunctions; ++i)
     {
     cmExecutionStatus status;
-    this->ExecuteCommand(cacheFile.Functions[i],status);
+    this->ExecuteCommand(listFile.Functions[i],status);
     if(cmSystemTools::GetFatalErrorOccured())
       {
       // Exit early due to error.
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 5927be1..b80a1ee 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -918,7 +918,7 @@ private:
                     bool noPolicyScope,
                     bool requireProjectCommand);
 
-  void ReadListFileInternal(cmListFile const& cacheFile,
+  void ReadListFileInternal(cmListFile const& listFile,
                             const char* filenametoread,
                             bool noPolicyScope);
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fe38bb2c29ab4273cfefb1b343b80388bea2893e
commit fe38bb2c29ab4273cfefb1b343b80388bea2893e
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 21 19:33:54 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 20:10:46 2015 +0200

    cmMakefile: Change return type of ReadListFileInternal.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 56fe028..9a1f7ef 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -601,7 +601,7 @@ bool cmMakefile::ReadListFile(const char* listfile,
   return res;
 }
 
-bool cmMakefile::ReadListFileInternal(cmListFile const& cacheFile,
+void cmMakefile::ReadListFileInternal(cmListFile const& cacheFile,
                                       const char* filenametoread,
                                       bool noPolicyScope)
 {
@@ -633,8 +633,6 @@ bool cmMakefile::ReadListFileInternal(cmListFile const& cacheFile,
       }
     }
   }
-
-  return true;
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 0c41268..5927be1 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -918,7 +918,7 @@ private:
                     bool noPolicyScope,
                     bool requireProjectCommand);
 
-  bool ReadListFileInternal(cmListFile const& cacheFile,
+  void ReadListFileInternal(cmListFile const& cacheFile,
                             const char* filenametoread,
                             bool noPolicyScope);
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ac10fc0958c94e17d89a686d1addae0ac18dc648
commit ac10fc0958c94e17d89a686d1addae0ac18dc648
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jun 21 19:30:23 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jun 21 20:10:45 2015 +0200

    cmMakefile: Move listfile parsing responsibility.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 63dbe27..56fe028 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -576,8 +576,14 @@ bool cmMakefile::ReadListFile(const char* listfile,
 
   this->ListFileStack.push_back(filenametoread);
 
-  bool res = this->ReadListFileInternal(filenametoread.c_str(),
-                                        noPolicyScope, requireProjectCommand);
+  cmListFile cacheFile;
+  bool res = cacheFile.ParseFile(filenametoread.c_str(),
+                                 requireProjectCommand, this);
+  if (res)
+    {
+    this->ReadListFileInternal(cacheFile, filenametoread.c_str(),
+                               noPolicyScope);
+    }
 
   this->AddDefinition("CMAKE_PARENT_LIST_FILE", currentParentFile.c_str());
   this->AddDefinition("CMAKE_CURRENT_LIST_FILE", currentFile.c_str());
@@ -595,15 +601,10 @@ bool cmMakefile::ReadListFile(const char* listfile,
   return res;
 }
 
-bool cmMakefile::ReadListFileInternal(const char* filenametoread,
-                                      bool noPolicyScope,
-                                      bool requireProjectCommand)
+bool cmMakefile::ReadListFileInternal(cmListFile const& cacheFile,
+                                      const char* filenametoread,
+                                      bool noPolicyScope)
 {
-  cmListFile cacheFile;
-  if( !cacheFile.ParseFile(filenametoread, requireProjectCommand, this) )
-    {
-    return false;
-    }
   // add this list file to the list of dependencies
   this->ListFiles.push_back( filenametoread);
 
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 86bde0c..0c41268 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -918,9 +918,9 @@ private:
                     bool noPolicyScope,
                     bool requireProjectCommand);
 
-  bool ReadListFileInternal(const char* filenametoread,
-                            bool noPolicyScope,
-                            bool requireProjectCommand);
+  bool ReadListFileInternal(cmListFile const& cacheFile,
+                            const char* filenametoread,
+                            bool noPolicyScope);
 
   bool ParseDefineFlag(std::string const& definition, bool remove);
 

-----------------------------------------------------------------------

Summary of changes:
 Source/CMakeVersion.cmake |    2 +-
 Source/cmMakefile.cxx     |  140 ++++++++++++++++++++++++---------------------
 Source/cmMakefile.h       |   15 ++---
 3 files changed, 82 insertions(+), 75 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list