[Cmake-commits] CMake branch, next, updated. v3.6.0-rc1-302-g18a6666

Stephen Kelly steveire at gmail.com
Mon Jun 13 14:09:00 EDT 2016


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  18a6666882ebb3cd24618530eef4793a882babd9 (commit)
       via  613d87392f7ee2d11165adc3aae96c6f4597d4c6 (commit)
      from  8bdf697d2c9811c61ee9727648c61692089a08c7 (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=18a6666882ebb3cd24618530eef4793a882babd9
commit 18a6666882ebb3cd24618530eef4793a882babd9
Merge: 8bdf697 613d873
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jun 13 14:08:59 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jun 13 14:08:59 2016 -0400

    Merge topic 'clean-up-Parser' into next
    
    613d8739 Revert "Revert branch"


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=613d87392f7ee2d11165adc3aae96c6f4597d4c6
commit 613d87392f7ee2d11165adc3aae96c6f4597d4c6
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jun 13 20:06:48 2016 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jun 13 20:06:55 2016 +0200

    Revert "Revert branch"
    
    This reverts commit c8a95d24aaa25856c1131488ade8fbb662bb09f2.

diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index 5e512e2..036a2b1 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -23,15 +23,12 @@ struct cmListFileParser
 {
   cmListFileParser(cmListFile* lf, cmMakefile* mf, const char* filename);
   ~cmListFileParser();
-  void IssueError(std::string const& text);
-  void IssueFileOpenError(std::string const& text) const;
   bool ParseFile();
   bool ParseFunction(const char* name, long line);
   bool AddArgument(cmListFileLexer_Token* token,
                    cmListFileArgument::Delimiter delim);
   cmListFile* ListFile;
   cmMakefile* Makefile;
-  cmListFileBacktrace Backtrace;
   const char* FileName;
   cmListFileLexer* Lexer;
   cmListFileFunction Function;
@@ -47,7 +44,6 @@ cmListFileParser::cmListFileParser(cmListFile* lf, cmMakefile* mf,
                                    const char* filename)
   : ListFile(lf)
   , Makefile(mf)
-  , Backtrace(mf->GetBacktrace())
   , FileName(filename)
   , Lexer(cmListFileLexer_New())
 {
@@ -58,37 +54,23 @@ cmListFileParser::~cmListFileParser()
   cmListFileLexer_Delete(this->Lexer);
 }
 
-void cmListFileParser::IssueFileOpenError(const std::string& text) const
-{
-  this->Makefile->GetCMakeInstance()->IssueMessage(cmake::FATAL_ERROR, text,
-                                                   this->Backtrace);
-}
-
-void cmListFileParser::IssueError(const std::string& text)
-{
-  cmListFileContext lfc;
-  lfc.FilePath = this->FileName;
-  lfc.Line = cmListFileLexer_GetCurrentLine(this->Lexer);
-  cmListFileBacktrace lfbt = this->Backtrace.Pop();
-  lfbt = lfbt.Push(lfc);
-  this->Makefile->GetCMakeInstance()->IssueMessage(cmake::FATAL_ERROR, text,
-                                                   lfbt);
-}
-
 bool cmListFileParser::ParseFile()
 {
   // Open the file.
   cmListFileLexer_BOM bom;
   if (!cmListFileLexer_SetFileName(this->Lexer, this->FileName, &bom)) {
-    this->IssueFileOpenError("cmListFileCache: error can not open file.");
+    cmSystemTools::Error("cmListFileCache: error can not open file ",
+                         this->FileName);
     return false;
   }
 
   // Verify the Byte-Order-Mark, if any.
   if (bom != cmListFileLexer_BOM_None && bom != cmListFileLexer_BOM_UTF8) {
     cmListFileLexer_SetFileName(this->Lexer, 0, 0);
-    this->IssueFileOpenError(
-      "File starts with a Byte-Order-Mark that is not UTF-8.");
+    std::ostringstream m;
+    m << "File\n  " << this->FileName << "\n"
+      << "starts with a Byte-Order-Mark that is not UTF-8.";
+    this->Makefile->IssueMessage(cmake::FATAL_ERROR, m.str());
     return false;
   }
 
@@ -111,25 +93,29 @@ bool cmListFileParser::ParseFile()
         }
       } else {
         std::ostringstream error;
-        error << "Parse error.  Expected a newline, got "
+        error << "Error in cmake code at\n"
+              << this->FileName << ":" << token->line << ":\n"
+              << "Parse error.  Expected a newline, got "
               << cmListFileLexer_GetTypeAsString(this->Lexer, token->type)
               << " with text \"" << token->text << "\".";
-        this->IssueError(error.str());
+        cmSystemTools::Error(error.str().c_str());
         return false;
       }
     } else {
       std::ostringstream error;
-      error << "Parse error.  Expected a command name, got "
+      error << "Error in cmake code at\n"
+            << this->FileName << ":" << token->line << ":\n"
+            << "Parse error.  Expected a command name, got "
             << cmListFileLexer_GetTypeAsString(this->Lexer, token->type)
             << " with text \"" << token->text << "\".";
-      this->IssueError(error.str());
+      cmSystemTools::Error(error.str().c_str());
       return false;
     }
   }
   return true;
 }
 
-bool cmListFile::ParseFile(const char* filename, cmMakefile* mf)
+bool cmListFile::ParseFile(const char* filename, bool topLevel, cmMakefile* mf)
 {
   if (!cmSystemTools::FileExists(filename) ||
       cmSystemTools::FileIsDirectory(filename)) {
@@ -143,6 +129,76 @@ bool cmListFile::ParseFile(const char* filename, cmMakefile* mf)
     parseError = !parser.ParseFile();
   }
 
+  // do we need a cmake_policy(VERSION call?
+  if (topLevel) {
+    bool hasVersion = false;
+    // search for the right policy command
+    for (std::vector<cmListFileFunction>::iterator i = this->Functions.begin();
+         i != this->Functions.end(); ++i) {
+      if (cmSystemTools::LowerCase(i->Name) == "cmake_minimum_required") {
+        hasVersion = true;
+        break;
+      }
+    }
+    // if no policy command is found this is an error if they use any
+    // non advanced functions or a lot of functions
+    if (!hasVersion) {
+      bool isProblem = true;
+      if (this->Functions.size() < 30) {
+        // the list of simple commands DO NOT ADD TO THIS LIST!!!!!
+        // these commands must have backwards compatibility forever and
+        // and that is a lot longer than your tiny mind can comprehend mortal
+        std::set<std::string> allowedCommands;
+        allowedCommands.insert("project");
+        allowedCommands.insert("set");
+        allowedCommands.insert("if");
+        allowedCommands.insert("endif");
+        allowedCommands.insert("else");
+        allowedCommands.insert("elseif");
+        allowedCommands.insert("add_executable");
+        allowedCommands.insert("add_library");
+        allowedCommands.insert("target_link_libraries");
+        allowedCommands.insert("option");
+        allowedCommands.insert("message");
+        isProblem = false;
+        for (std::vector<cmListFileFunction>::iterator i =
+               this->Functions.begin();
+             i != this->Functions.end(); ++i) {
+          std::string name = cmSystemTools::LowerCase(i->Name);
+          if (allowedCommands.find(name) == allowedCommands.end()) {
+            isProblem = true;
+            break;
+          }
+        }
+      }
+
+      if (isProblem) {
+        // Tell the top level cmMakefile to diagnose
+        // this violation of CMP0000.
+        mf->SetCheckCMP0000(true);
+
+        // Implicitly set the version for the user.
+        mf->SetPolicyVersion("2.4");
+      }
+    }
+    bool hasProject = false;
+    // search for a project command
+    for (std::vector<cmListFileFunction>::iterator i = this->Functions.begin();
+         i != this->Functions.end(); ++i) {
+      if (cmSystemTools::LowerCase(i->Name) == "project") {
+        hasProject = true;
+        break;
+      }
+    }
+    // if no project command is found, add one
+    if (!hasProject) {
+      cmListFileFunction project;
+      project.Name = "PROJECT";
+      cmListFileArgument prj("Project", cmListFileArgument::Unquoted, 0);
+      project.Arguments.push_back(prj);
+      this->Functions.insert(this->Functions.begin(), project);
+    }
+  }
   return !parseError;
 }
 
@@ -165,15 +221,18 @@ bool cmListFileParser::ParseFunction(const char* name, long line)
           << cmListFileLexer_GetCurrentLine(this->Lexer) << ":\n"
           << "Parse error.  Function missing opening \"(\".";
     /* clang-format on */
-    this->IssueError(error.str());
+    cmSystemTools::Error(error.str().c_str());
     return false;
   }
   if (token->type != cmListFileLexer_Token_ParenLeft) {
     std::ostringstream error;
-    error << "Parse error.  Expected \"(\", got "
+    error << "Error in cmake code at\n"
+          << this->FileName << ":"
+          << cmListFileLexer_GetCurrentLine(this->Lexer) << ":\n"
+          << "Parse error.  Expected \"(\", got "
           << cmListFileLexer_GetTypeAsString(this->Lexer, token->type)
           << " with text \"" << token->text << "\".";
-    this->IssueError(error.str());
+    cmSystemTools::Error(error.str().c_str());
     return false;
   }
 
@@ -225,25 +284,25 @@ bool cmListFileParser::ParseFunction(const char* name, long line)
     } else {
       // Error.
       std::ostringstream error;
-      error << "Parse error.  Function missing ending \")\".  "
+      error << "Error in cmake code at\n"
+            << this->FileName << ":"
+            << cmListFileLexer_GetCurrentLine(this->Lexer) << ":\n"
+            << "Parse error.  Function missing ending \")\".  "
             << "Instead found "
             << cmListFileLexer_GetTypeAsString(this->Lexer, token->type)
             << " with text \"" << token->text << "\".";
-      this->IssueError(error.str());
+      cmSystemTools::Error(error.str().c_str());
       return false;
     }
   }
 
   std::ostringstream error;
-  cmListFileContext lfc;
-  lfc.FilePath = this->FileName;
-  lfc.Line = lastLine;
-  cmListFileBacktrace lfbt = this->Backtrace.Pop();
-  lfbt = lfbt.Push(lfc);
-  error << "Parse error.  Function missing ending \")\".  "
+  error << "Error in cmake code at\n"
+        << this->FileName << ":" << lastLine << ":\n"
+        << "Parse error.  Function missing ending \")\".  "
         << "End of file reached.";
-  this->Makefile->GetCMakeInstance()->IssueMessage(cmake::FATAL_ERROR,
-                                                   error.str(), lfbt);
+  cmSystemTools::Error(error.str().c_str());
+
   return false;
 }
 
@@ -258,18 +317,19 @@ bool cmListFileParser::AddArgument(cmListFileLexer_Token* token,
   bool isError = (this->Separation == SeparationError ||
                   delim == cmListFileArgument::Bracket);
   std::ostringstream m;
-  cmListFileContext lfc;
-  lfc.FilePath = this->FileName;
-  lfc.Line = token->line;
-  cmListFileBacktrace lfbt = this->Backtrace.Pop();
-  lfbt = lfbt.Push(lfc);
-
-  m << "Syntax " << (isError ? "Error" : "Warning") << " in cmake code at "
-    << token->line << ":" << token->column << "\n"
+  /* clang-format off */
+  m << "Syntax " << (isError? "Error":"Warning") << " in cmake code at\n"
+    << "  " << this->FileName << ":" << token->line << ":"
+    << token->column << "\n"
     << "Argument not separated from preceding token by whitespace.";
-  this->Makefile->GetCMakeInstance()->IssueMessage(
-    isError ? cmake::FATAL_ERROR : cmake::AUTHOR_WARNING, m.str(), lfbt);
-  return !isError;
+  /* clang-format on */
+  if (isError) {
+    this->Makefile->IssueMessage(cmake::FATAL_ERROR, m.str());
+    return false;
+  } else {
+    this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, m.str());
+    return true;
+  }
 }
 
 struct cmListFileBacktrace::Entry : public cmListFileContext
diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h
index f3e6f70..d72c360 100644
--- a/Source/cmListFileCache.h
+++ b/Source/cmListFileCache.h
@@ -158,7 +158,7 @@ private:
 
 struct cmListFile
 {
-  bool ParseFile(const char* path, cmMakefile* mf);
+  bool ParseFile(const char* path, bool topLevel, cmMakefile* mf);
 
   std::vector<cmListFileFunction> Functions;
 };
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 0a80347..ca30b3d 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -426,7 +426,7 @@ bool cmMakefile::ReadDependentFile(const char* filename, bool noPolicyScope)
   IncludeScope incScope(this, filenametoread, noPolicyScope);
 
   cmListFile listFile;
-  if (!listFile.ParseFile(filenametoread.c_str(), this)) {
+  if (!listFile.ParseFile(filenametoread.c_str(), false, this)) {
     return false;
   }
 
@@ -475,7 +475,7 @@ bool cmMakefile::ReadListFile(const char* filename)
   ListFileScope scope(this, filenametoread);
 
   cmListFile listFile;
-  if (!listFile.ParseFile(filenametoread.c_str(), this)) {
+  if (!listFile.ParseFile(filenametoread.c_str(), false, this)) {
     return false;
   }
 
@@ -1420,81 +1420,10 @@ void cmMakefile::Configure()
   this->AddDefinition("CMAKE_PARENT_LIST_FILE", currentStart.c_str());
 
   cmListFile listFile;
-  if (!listFile.ParseFile(currentStart.c_str(), this)) {
+  if (!listFile.ParseFile(currentStart.c_str(), this->IsRootMakefile(),
+                          this)) {
     return;
   }
-  if (this->IsRootMakefile()) {
-    bool hasVersion = false;
-    // search for the right policy command
-    for (std::vector<cmListFileFunction>::iterator i =
-           listFile.Functions.begin();
-         i != listFile.Functions.end(); ++i) {
-      if (cmSystemTools::LowerCase(i->Name) == "cmake_minimum_required") {
-        hasVersion = true;
-        break;
-      }
-    }
-    // if no policy command is found this is an error if they use any
-    // non advanced functions or a lot of functions
-    if (!hasVersion) {
-      bool isProblem = true;
-      if (listFile.Functions.size() < 30) {
-        // the list of simple commands DO NOT ADD TO THIS LIST!!!!!
-        // these commands must have backwards compatibility forever and
-        // and that is a lot longer than your tiny mind can comprehend mortal
-        std::set<std::string> allowedCommands;
-        allowedCommands.insert("project");
-        allowedCommands.insert("set");
-        allowedCommands.insert("if");
-        allowedCommands.insert("endif");
-        allowedCommands.insert("else");
-        allowedCommands.insert("elseif");
-        allowedCommands.insert("add_executable");
-        allowedCommands.insert("add_library");
-        allowedCommands.insert("target_link_libraries");
-        allowedCommands.insert("option");
-        allowedCommands.insert("message");
-        isProblem = false;
-        for (std::vector<cmListFileFunction>::iterator i =
-               listFile.Functions.begin();
-             i != listFile.Functions.end(); ++i) {
-          std::string name = cmSystemTools::LowerCase(i->Name);
-          if (allowedCommands.find(name) == allowedCommands.end()) {
-            isProblem = true;
-            break;
-          }
-        }
-      }
-
-      if (isProblem) {
-        // Tell the top level cmMakefile to diagnose
-        // this violation of CMP0000.
-        this->SetCheckCMP0000(true);
-
-        // Implicitly set the version for the user.
-        this->SetPolicyVersion("2.4");
-      }
-    }
-    bool hasProject = false;
-    // search for a project command
-    for (std::vector<cmListFileFunction>::iterator i =
-           listFile.Functions.begin();
-         i != listFile.Functions.end(); ++i) {
-      if (cmSystemTools::LowerCase(i->Name) == "project") {
-        hasProject = true;
-        break;
-      }
-    }
-    // if no project command is found, add one
-    if (!hasProject) {
-      cmListFileFunction project;
-      project.Name = "PROJECT";
-      cmListFileArgument prj("Project", cmListFileArgument::Unquoted, 0);
-      project.Arguments.push_back(prj);
-      listFile.Functions.insert(listFile.Functions.begin(), project);
-    }
-  }
-
   this->ReadListFile(listFile, currentStart);
   if (cmSystemTools::GetFatalErrorOccured()) {
     scope.Quiet();
diff --git a/Tests/RunCMake/Syntax/BOM-UTF-16-BE-stderr.txt b/Tests/RunCMake/Syntax/BOM-UTF-16-BE-stderr.txt
index f0b6783..a845ffb 100644
--- a/Tests/RunCMake/Syntax/BOM-UTF-16-BE-stderr.txt
+++ b/Tests/RunCMake/Syntax/BOM-UTF-16-BE-stderr.txt
@@ -1,4 +1,8 @@
 CMake Error in BOM-UTF-16-BE.cmake:
-  File starts with a Byte-Order-Mark that is not UTF-8.
+  File
+
+    .*/Tests/RunCMake/Syntax/BOM-UTF-16-BE.cmake
+
+  starts with a Byte-Order-Mark that is not UTF-8.
 Call Stack \(most recent call first\):
   CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/BOM-UTF-16-LE-stderr.txt b/Tests/RunCMake/Syntax/BOM-UTF-16-LE-stderr.txt
index bcc9c38..cc4244b 100644
--- a/Tests/RunCMake/Syntax/BOM-UTF-16-LE-stderr.txt
+++ b/Tests/RunCMake/Syntax/BOM-UTF-16-LE-stderr.txt
@@ -1,4 +1,8 @@
 CMake Error in BOM-UTF-16-LE.cmake:
-  File starts with a Byte-Order-Mark that is not UTF-8.
+  File
+
+    .*/Tests/RunCMake/Syntax/BOM-UTF-16-LE.cmake
+
+  starts with a Byte-Order-Mark that is not UTF-8.
 Call Stack \(most recent call first\):
   CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/BOM-UTF-32-BE-stderr.txt b/Tests/RunCMake/Syntax/BOM-UTF-32-BE-stderr.txt
index 7bd74c9..5f851bf 100644
--- a/Tests/RunCMake/Syntax/BOM-UTF-32-BE-stderr.txt
+++ b/Tests/RunCMake/Syntax/BOM-UTF-32-BE-stderr.txt
@@ -1,4 +1,8 @@
 CMake Error in BOM-UTF-32-BE.cmake:
-  File starts with a Byte-Order-Mark that is not UTF-8.
+  File
+
+    .*/Tests/RunCMake/Syntax/BOM-UTF-32-BE.cmake
+
+  starts with a Byte-Order-Mark that is not UTF-8.
 Call Stack \(most recent call first\):
   CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/BOM-UTF-32-LE-stderr.txt b/Tests/RunCMake/Syntax/BOM-UTF-32-LE-stderr.txt
index 678013f..d8fafd0 100644
--- a/Tests/RunCMake/Syntax/BOM-UTF-32-LE-stderr.txt
+++ b/Tests/RunCMake/Syntax/BOM-UTF-32-LE-stderr.txt
@@ -1,4 +1,8 @@
 CMake Error in BOM-UTF-32-LE.cmake:
-  File starts with a Byte-Order-Mark that is not UTF-8.
+  File
+
+    .*/Tests/RunCMake/Syntax/BOM-UTF-32-LE.cmake
+
+  starts with a Byte-Order-Mark that is not UTF-8.
 Call Stack \(most recent call first\):
   CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/BracketComment4-stderr.txt b/Tests/RunCMake/Syntax/BracketComment4-stderr.txt
index 5ee4b18..8ba32c2 100644
--- a/Tests/RunCMake/Syntax/BracketComment4-stderr.txt
+++ b/Tests/RunCMake/Syntax/BracketComment4-stderr.txt
@@ -1,2 +1,7 @@
-CMake Error at BracketComment4.cmake:3:
-  Parse error.  Expected a newline, got identifier with text "message".
+CMake Error: Error in cmake code at
+.*/Tests/RunCMake/Syntax/BracketComment4.cmake:3:
+Parse error.  Expected a newline, got identifier with text "message".
+CMake Error at CMakeLists.txt:3 \(include\):
+  include could not find load file:
+
+    BracketComment4.cmake
diff --git a/Tests/RunCMake/Syntax/BracketNoSpace0-stderr.txt b/Tests/RunCMake/Syntax/BracketNoSpace0-stderr.txt
index 836b4cb..a288280 100644
--- a/Tests/RunCMake/Syntax/BracketNoSpace0-stderr.txt
+++ b/Tests/RunCMake/Syntax/BracketNoSpace0-stderr.txt
@@ -1,4 +1,8 @@
-CMake Error at BracketNoSpace0.cmake:1:
-  Syntax Error in cmake code at 1:27
+CMake Error in BracketNoSpace0.cmake:
+  Syntax Error in cmake code at
+
+    .*/Tests/RunCMake/Syntax/BracketNoSpace0.cmake:1:27
 
   Argument not separated from preceding token by whitespace.
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/BracketNoSpace1-stderr.txt b/Tests/RunCMake/Syntax/BracketNoSpace1-stderr.txt
index 904df72..391e11b 100644
--- a/Tests/RunCMake/Syntax/BracketNoSpace1-stderr.txt
+++ b/Tests/RunCMake/Syntax/BracketNoSpace1-stderr.txt
@@ -1,4 +1,8 @@
-CMake Error at BracketNoSpace1.cmake:1:
-  Syntax Error in cmake code at 1:24
+CMake Error in BracketNoSpace1.cmake:
+  Syntax Error in cmake code at
+
+    .*/Tests/RunCMake/Syntax/BracketNoSpace1.cmake:1:24
 
   Argument not separated from preceding token by whitespace.
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/BracketNoSpace2-stderr.txt b/Tests/RunCMake/Syntax/BracketNoSpace2-stderr.txt
index 0357c16..acaf7fe 100644
--- a/Tests/RunCMake/Syntax/BracketNoSpace2-stderr.txt
+++ b/Tests/RunCMake/Syntax/BracketNoSpace2-stderr.txt
@@ -1,4 +1,8 @@
-CMake Error at BracketNoSpace2.cmake:1:
-  Syntax Error in cmake code at 1:44
+CMake Error in BracketNoSpace2.cmake:
+  Syntax Error in cmake code at
+
+    .*/Tests/RunCMake/Syntax/BracketNoSpace2.cmake:1:44
 
   Argument not separated from preceding token by whitespace.
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/BracketNoSpace3-stderr.txt b/Tests/RunCMake/Syntax/BracketNoSpace3-stderr.txt
index f70a052..f12b2e5 100644
--- a/Tests/RunCMake/Syntax/BracketNoSpace3-stderr.txt
+++ b/Tests/RunCMake/Syntax/BracketNoSpace3-stderr.txt
@@ -1,4 +1,8 @@
-CMake Error at BracketNoSpace3.cmake:1:
-  Syntax Error in cmake code at 1:45
+CMake Error in BracketNoSpace3.cmake:
+  Syntax Error in cmake code at
+
+    .*/Tests/RunCMake/Syntax/BracketNoSpace3.cmake:1:45
 
   Argument not separated from preceding token by whitespace.
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/BracketNoSpace4-stderr.txt b/Tests/RunCMake/Syntax/BracketNoSpace4-stderr.txt
index 7dc7299..7157763 100644
--- a/Tests/RunCMake/Syntax/BracketNoSpace4-stderr.txt
+++ b/Tests/RunCMake/Syntax/BracketNoSpace4-stderr.txt
@@ -1,4 +1,8 @@
-CMake Error at BracketNoSpace4.cmake:1:
-  Syntax Error in cmake code at 1:44
+CMake Error in BracketNoSpace4.cmake:
+  Syntax Error in cmake code at
+
+    .*/Tests/RunCMake/Syntax/BracketNoSpace4.cmake:1:44
 
   Argument not separated from preceding token by whitespace.
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/BracketNoSpace5-stderr.txt b/Tests/RunCMake/Syntax/BracketNoSpace5-stderr.txt
index 59e431d..c13969d 100644
--- a/Tests/RunCMake/Syntax/BracketNoSpace5-stderr.txt
+++ b/Tests/RunCMake/Syntax/BracketNoSpace5-stderr.txt
@@ -1,4 +1,8 @@
-CMake Error at BracketNoSpace5.cmake:1:
-  Syntax Error in cmake code at 1:45
+CMake Error in BracketNoSpace5.cmake:
+  Syntax Error in cmake code at
+
+    .*/Tests/RunCMake/Syntax/BracketNoSpace5.cmake:1:45
 
   Argument not separated from preceding token by whitespace.
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/CommandError0-stderr.txt b/Tests/RunCMake/Syntax/CommandError0-stderr.txt
index 55c9ce0..24d7997 100644
--- a/Tests/RunCMake/Syntax/CommandError0-stderr.txt
+++ b/Tests/RunCMake/Syntax/CommandError0-stderr.txt
@@ -1,4 +1,8 @@
-CMake Error at CommandError0.cmake:2:
-  Parse error.  Expected "\(", got newline with text "
+CMake Error: Error in cmake code at
+.*/Tests/RunCMake/Syntax/CommandError0.cmake:2:
+Parse error.  Expected "\(", got newline with text "
+".
+CMake Error at CMakeLists.txt:3 \(include\):
+  include could not find load file:
 
-  ".
+    CommandError0.cmake
diff --git a/Tests/RunCMake/Syntax/CommandError1-stderr.txt b/Tests/RunCMake/Syntax/CommandError1-stderr.txt
index acf4505..599f600 100644
--- a/Tests/RunCMake/Syntax/CommandError1-stderr.txt
+++ b/Tests/RunCMake/Syntax/CommandError1-stderr.txt
@@ -1,2 +1,7 @@
-CMake Error at CommandError1.cmake:1:
-  Parse error.  Expected a newline, got identifier with text "message".
+CMake Error: Error in cmake code at
+.*/Tests/RunCMake/Syntax/CommandError1.cmake:1:
+Parse error.  Expected a newline, got identifier with text "message".
+CMake Error at CMakeLists.txt:3 \(include\):
+  include could not find load file:
+
+    CommandError1.cmake
diff --git a/Tests/RunCMake/Syntax/CommandError2-stderr.txt b/Tests/RunCMake/Syntax/CommandError2-stderr.txt
index 95c4ad1..f4dfc77 100644
--- a/Tests/RunCMake/Syntax/CommandError2-stderr.txt
+++ b/Tests/RunCMake/Syntax/CommandError2-stderr.txt
@@ -1,3 +1,7 @@
-CMake Error at CommandError2.cmake:1:
-  Parse error.  Expected a command name, got bracket argument with text
-  "oops-not-a-comment".
+CMake Error: Error in cmake code at
+.*/Tests/RunCMake/Syntax/CommandError2.cmake:1:
+Parse error.  Expected a command name, got bracket argument with text "oops-not-a-comment".
+CMake Error at CMakeLists.txt:3 \(include\):
+  include could not find load file:
+
+    CommandError2.cmake
diff --git a/Tests/RunCMake/Syntax/ParenInENV-stderr.txt b/Tests/RunCMake/Syntax/ParenInENV-stderr.txt
index b9fb05a..37c5d6e 100644
--- a/Tests/RunCMake/Syntax/ParenInENV-stderr.txt
+++ b/Tests/RunCMake/Syntax/ParenInENV-stderr.txt
@@ -1,5 +1,7 @@
-CMake Warning \(dev\) at ParenInENV.cmake:2:
-  Syntax Warning in cmake code at 2:21
+CMake Warning \(dev\) in ParenInENV.cmake:
+  Syntax Warning in cmake code at
+
+    .*/Tests/RunCMake/Syntax/ParenInENV.cmake:2:21
 
   Argument not separated from preceding token by whitespace.
 Call Stack \(most recent call first\):
@@ -9,7 +11,7 @@ This warning is for project developers.  Use -Wno-dev to suppress it.
 CMake Error at ParenInENV.cmake:2 \(message\):
   Syntax error in cmake code at
 
-    .*Tests/RunCMake/Syntax/ParenInENV.cmake:2
+    .*/Tests/RunCMake/Syntax/ParenInENV.cmake:2
 
   when parsing string
 
diff --git a/Tests/RunCMake/Syntax/ParenNoSpace1-stderr.txt b/Tests/RunCMake/Syntax/ParenNoSpace1-stderr.txt
index d8b56e9..45b2e6a 100644
--- a/Tests/RunCMake/Syntax/ParenNoSpace1-stderr.txt
+++ b/Tests/RunCMake/Syntax/ParenNoSpace1-stderr.txt
@@ -1,20 +1,28 @@
-CMake Warning \(dev\) at ParenNoSpace1.cmake:1:
-  Syntax Warning in cmake code at 1:26
+CMake Warning \(dev\) in ParenNoSpace1.cmake:
+  Syntax Warning in cmake code at
+
+    .*/Tests/RunCMake/Syntax/ParenNoSpace1.cmake:1:26
 
   Argument not separated from preceding token by whitespace.
 Call Stack \(most recent call first\):
   CMakeLists.txt:3 \(include\)
 This warning is for project developers.  Use -Wno-dev to suppress it.
 
-CMake Warning \(dev\) at ParenNoSpace1.cmake:2:
-  Syntax Warning in cmake code at 2:26
+CMake Warning \(dev\) in ParenNoSpace1.cmake:
+  Syntax Warning in cmake code at
+
+    .*/Tests/RunCMake/Syntax/ParenNoSpace1.cmake:2:26
 
   Argument not separated from preceding token by whitespace.
 Call Stack \(most recent call first\):
   CMakeLists.txt:3 \(include\)
 This warning is for project developers.  Use -Wno-dev to suppress it.
 
-CMake Error at ParenNoSpace1.cmake:3:
-  Syntax Error in cmake code at 3:29
+CMake Error in ParenNoSpace1.cmake:
+  Syntax Error in cmake code at
+
+    .*/Tests/RunCMake/Syntax/ParenNoSpace1.cmake:3:29
 
   Argument not separated from preceding token by whitespace.
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/Syntax/StringNoSpace-stderr.txt b/Tests/RunCMake/Syntax/StringNoSpace-stderr.txt
index f21a8c6..a4ec6e7 100644
--- a/Tests/RunCMake/Syntax/StringNoSpace-stderr.txt
+++ b/Tests/RunCMake/Syntax/StringNoSpace-stderr.txt
@@ -1,13 +1,17 @@
-CMake Warning \(dev\) at StringNoSpace.cmake:2:
-  Syntax Warning in cmake code at 2:28
+CMake Warning \(dev\) in StringNoSpace.cmake:
+  Syntax Warning in cmake code at
+
+    .*/Tests/RunCMake/Syntax/StringNoSpace.cmake:2:28
 
   Argument not separated from preceding token by whitespace.
 Call Stack \(most recent call first\):
   CMakeLists.txt:3 \(include\)
 This warning is for project developers.  Use -Wno-dev to suppress it.
 
-CMake Warning \(dev\) at StringNoSpace.cmake:2:
-  Syntax Warning in cmake code at 2:31
+CMake Warning \(dev\) in StringNoSpace.cmake:
+  Syntax Warning in cmake code at
+
+    .*/Tests/RunCMake/Syntax/StringNoSpace.cmake:2:31
 
   Argument not separated from preceding token by whitespace.
 Call Stack \(most recent call first\):
@@ -16,4 +20,4 @@ This warning is for project developers.  Use -Wno-dev to suppress it.
 
 \[1 \${var} \\n 4\]
 \[x\]
-\[y\]
+\[y\]$
diff --git a/Tests/RunCMake/Syntax/UnterminatedBracket0-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedBracket0-stderr.txt
index 2fca570..3559c18 100644
--- a/Tests/RunCMake/Syntax/UnterminatedBracket0-stderr.txt
+++ b/Tests/RunCMake/Syntax/UnterminatedBracket0-stderr.txt
@@ -1,5 +1,8 @@
-CMake Error at UnterminatedBracket0.cmake:2:
-  Parse error.  Function missing ending "\)".  Instead found unterminated
-  bracket with text "\)
+CMake Error: Error in cmake code at
+.*/Syntax/UnterminatedBracket0.cmake:2:
+Parse error.  Function missing ending "\)".  Instead found unterminated bracket with text "\)
+".
+CMake Error at CMakeLists.txt:3 \(include\):
+  include could not find load file:
 
-  ".
+    UnterminatedBracket0.cmake$
diff --git a/Tests/RunCMake/Syntax/UnterminatedBracket1-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedBracket1-stderr.txt
index a999d9f..55d458b 100644
--- a/Tests/RunCMake/Syntax/UnterminatedBracket1-stderr.txt
+++ b/Tests/RunCMake/Syntax/UnterminatedBracket1-stderr.txt
@@ -1,5 +1,8 @@
-CMake Error at UnterminatedBracket1.cmake:2:
-  Parse error.  Function missing ending "\)".  Instead found unterminated
-  bracket with text "\]\]\)
+CMake Error: Error in cmake code at
+.*/Syntax/UnterminatedBracket1.cmake:2:
+Parse error.  Function missing ending "\)".  Instead found unterminated bracket with text "\]\]\)
+".
+CMake Error at CMakeLists.txt:3 \(include\):
+  include could not find load file:
 
-  ".
+    UnterminatedBracket1.cmake$
diff --git a/Tests/RunCMake/Syntax/UnterminatedBracketComment-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedBracketComment-stderr.txt
index 39de20d..0a799eb 100644
--- a/Tests/RunCMake/Syntax/UnterminatedBracketComment-stderr.txt
+++ b/Tests/RunCMake/Syntax/UnterminatedBracketComment-stderr.txt
@@ -1,5 +1,8 @@
-CMake Error at UnterminatedBracketComment.cmake:3:
-  Parse error.  Expected a command name, got unterminated bracket with text
-  "#\]\]
+CMake Error: Error in cmake code at
+.*/Syntax/UnterminatedBracketComment.cmake:1:
+Parse error.  Expected a command name, got unterminated bracket with text "#\]\]
+".
+CMake Error at CMakeLists.txt:3 \(include\):
+  include could not find load file:
 
-  ".
+    UnterminatedBracketComment.cmake
diff --git a/Tests/RunCMake/Syntax/UnterminatedCall1-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedCall1-stderr.txt
index 3f52244..281ce0d 100644
--- a/Tests/RunCMake/Syntax/UnterminatedCall1-stderr.txt
+++ b/Tests/RunCMake/Syntax/UnterminatedCall1-stderr.txt
@@ -1,4 +1,7 @@
-CMake Error at UnterminatedCall1.cmake:2:
-  Parse error.  Function missing ending "\)".  End of file reached.
-Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
+CMake Error: Error in cmake code at
+.*/Syntax/UnterminatedCall1.cmake:2:
+Parse error.  Function missing ending "\)".  End of file reached.
+CMake Error at CMakeLists.txt:3 \(include\):
+  include could not find load file:
+
+    UnterminatedCall1.cmake
diff --git a/Tests/RunCMake/Syntax/UnterminatedCall2-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedCall2-stderr.txt
index dabc168..065de30 100644
--- a/Tests/RunCMake/Syntax/UnterminatedCall2-stderr.txt
+++ b/Tests/RunCMake/Syntax/UnterminatedCall2-stderr.txt
@@ -1,2 +1,7 @@
-CMake Error at UnterminatedCall2.cmake:4:
-  Parse error.  Function missing ending "\)".  End of file reached.
+CMake Error: Error in cmake code at
+.*/Syntax/UnterminatedCall2.cmake:4:
+Parse error.  Function missing ending "\)".  End of file reached.
+CMake Error at CMakeLists.txt:3 \(include\):
+  include could not find load file:
+
+    UnterminatedCall2.cmake
diff --git a/Tests/RunCMake/Syntax/UnterminatedString-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedString-stderr.txt
index a8c0a75..d925032 100644
--- a/Tests/RunCMake/Syntax/UnterminatedString-stderr.txt
+++ b/Tests/RunCMake/Syntax/UnterminatedString-stderr.txt
@@ -1,5 +1,8 @@
-CMake Error at UnterminatedString.cmake:2:
-  Parse error.  Function missing ending "\)".  Instead found unterminated
-  string with text "\)
+CMake Error: Error in cmake code at
+.*/Syntax/UnterminatedString.cmake:2:
+Parse error.  Function missing ending "\)".  Instead found unterminated string with text "\)
+".
+CMake Error at CMakeLists.txt:3 \(include\):
+  include could not find load file:
 
-  ".
+    UnterminatedString.cmake$

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

Summary of changes:
 Source/cmListFileCache.cxx                         |  166 +++++++++++++-------
 Source/cmListFileCache.h                           |    2 +-
 Source/cmMakefile.cxx                              |   79 +---------
 Tests/RunCMake/Syntax/BOM-UTF-16-BE-stderr.txt     |    6 +-
 Tests/RunCMake/Syntax/BOM-UTF-16-LE-stderr.txt     |    6 +-
 Tests/RunCMake/Syntax/BOM-UTF-32-BE-stderr.txt     |    6 +-
 Tests/RunCMake/Syntax/BOM-UTF-32-LE-stderr.txt     |    6 +-
 Tests/RunCMake/Syntax/BracketComment4-stderr.txt   |    9 +-
 Tests/RunCMake/Syntax/BracketNoSpace0-stderr.txt   |    8 +-
 Tests/RunCMake/Syntax/BracketNoSpace1-stderr.txt   |    8 +-
 Tests/RunCMake/Syntax/BracketNoSpace2-stderr.txt   |    8 +-
 Tests/RunCMake/Syntax/BracketNoSpace3-stderr.txt   |    8 +-
 Tests/RunCMake/Syntax/BracketNoSpace4-stderr.txt   |    8 +-
 Tests/RunCMake/Syntax/BracketNoSpace5-stderr.txt   |    8 +-
 Tests/RunCMake/Syntax/CommandError0-stderr.txt     |   10 +-
 Tests/RunCMake/Syntax/CommandError1-stderr.txt     |    9 +-
 Tests/RunCMake/Syntax/CommandError2-stderr.txt     |   10 +-
 Tests/RunCMake/Syntax/ParenInENV-stderr.txt        |    8 +-
 Tests/RunCMake/Syntax/ParenNoSpace1-stderr.txt     |   20 ++-
 Tests/RunCMake/Syntax/StringNoSpace-stderr.txt     |   14 +-
 .../Syntax/UnterminatedBracket0-stderr.txt         |   11 +-
 .../Syntax/UnterminatedBracket1-stderr.txt         |   11 +-
 .../Syntax/UnterminatedBracketComment-stderr.txt   |   11 +-
 Tests/RunCMake/Syntax/UnterminatedCall1-stderr.txt |   11 +-
 Tests/RunCMake/Syntax/UnterminatedCall2-stderr.txt |    9 +-
 .../RunCMake/Syntax/UnterminatedString-stderr.txt  |   11 +-
 26 files changed, 272 insertions(+), 191 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list