[Cmake-commits] [cmake-commits] king committed cmFunctionCommand.cxx 1.9 1.10 cmMacroCommand.cxx 1.39 1.40

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Jan 21 09:49:33 EST 2009


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv9129/Source

Modified Files:
	cmFunctionCommand.cxx cmMacroCommand.cxx 
Log Message:
ENH: Enforce logical blocks in functions/macros

This teaches function() and macro() to enforce matching logical blocks
inside the recorded bodies.  This makes the error message more specific.


Index: cmMacroCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMacroCommand.cxx,v
retrieving revision 1.39
retrieving revision 1.40
diff -C 2 -d -r1.39 -r1.40
*** cmMacroCommand.cxx	21 Jan 2009 14:49:00 -0000	1.39
--- cmMacroCommand.cxx	21 Jan 2009 14:49:31 -0000	1.40
***************
*** 108,111 ****
--- 108,114 ----
      }
  
+   // Enforce matching logical blocks inside the macro.
+   cmMakefile::LexicalPushPop lexScope(this->Makefile);
+ 
    // set the value of argc
    cmOStringStream argcDefStream;
***************
*** 216,219 ****
--- 219,223 ----
        // The error message should have already included the call stack
        // so we do not need to report an error here.
+       lexScope.Quiet();
        inStatus.SetNestedError(true);
        return false;

Index: cmFunctionCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFunctionCommand.cxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -C 2 -d -r1.9 -r1.10
*** cmFunctionCommand.cxx	21 Jan 2009 14:49:00 -0000	1.9
--- cmFunctionCommand.cxx	21 Jan 2009 14:49:31 -0000	1.10
***************
*** 105,108 ****
--- 105,109 ----
  
    // we push a scope on the makefile
+   cmMakefile::LexicalPushPop lexScope(this->Makefile);
    cmMakefile::ScopePushPop varScope(this->Makefile);
    static_cast<void>(varScope);
***************
*** 164,167 ****
--- 165,169 ----
        // The error message should have already included the call stack
        // so we do not need to report an error here.
+       lexScope.Quiet();
        inStatus.SetNestedError(true);
        return false;



More information about the Cmake-commits mailing list