[Cmake-commits] [cmake-commits] king committed cmMessageCommand.cxx 1.24 1.25 cmMessageCommand.h 1.17 1.18

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Mar 6 12:06:48 EST 2009


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

Modified Files:
	cmMessageCommand.cxx cmMessageCommand.h 
Log Message:
BUG: Fix message(SEND_ERROR) to continue

During testing of the new message() signatures I mistakenly concluded
that SEND_ERROR stops processing.  The corresponding commit enforced
this wrong behavior.  This restores the correct behavior and fixes the
documentation accordingly.


Index: cmMessageCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMessageCommand.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -C 2 -d -r1.17 -r1.18
*** cmMessageCommand.h	6 Mar 2009 15:04:02 -0000	1.17
--- cmMessageCommand.h	6 Mar 2009 17:06:43 -0000	1.18
***************
*** 73,78 ****
        "  WARNING        = CMake Warning, continue processing\n"
        "  AUTHOR_WARNING = CMake Warning (dev), continue processing\n"
        "  FATAL_ERROR    = CMake Error, stop all processing\n"
-       "  SEND_ERROR     = CMake Error, stop all processing (legacy)\n"
        "The CMake command-line tool displays STATUS messages on stdout "
        "and all other message types on stderr.  "
--- 73,78 ----
        "  WARNING        = CMake Warning, continue processing\n"
        "  AUTHOR_WARNING = CMake Warning (dev), continue processing\n"
+       "  SEND_ERROR     = CMake Error, continue but skip generation\n"
        "  FATAL_ERROR    = CMake Error, stop all processing\n"
        "The CMake command-line tool displays STATUS messages on stdout "
        "and all other message types on stderr.  "

Index: cmMessageCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMessageCommand.cxx,v
retrieving revision 1.24
retrieving revision 1.25
diff -C 2 -d -r1.24 -r1.25
*** cmMessageCommand.cxx	6 Mar 2009 15:04:01 -0000	1.24
--- cmMessageCommand.cxx	6 Mar 2009 17:06:41 -0000	1.25
***************
*** 31,39 ****
    cmake::MessageType type = cmake::MESSAGE;
    bool status = false;
!   if (*i == "SEND_ERROR" || *i == "FATAL_ERROR")
      {
      type = cmake::FATAL_ERROR;
      ++i;
      }
    else if (*i == "WARNING")
      {
--- 31,46 ----
    cmake::MessageType type = cmake::MESSAGE;
    bool status = false;
!   bool fatal = false;
!   if (*i == "SEND_ERROR")
      {
      type = cmake::FATAL_ERROR;
      ++i;
      }
+   else if (*i == "FATAL_ERROR")
+     {
+     fatal = true;
+     type = cmake::FATAL_ERROR;
+     ++i;
+     }
    else if (*i == "WARNING")
      {
***************
*** 72,75 ****
--- 79,86 ----
        }
      }
+   if(fatal)
+     {
+     cmSystemTools::SetFatalErrorOccured();
+     }
    return true;
  }



More information about the Cmake-commits mailing list