[Cmake-commits] [cmake-commits] king committed cmMessageCommand.cxx 1.23 1.24 cmMessageCommand.h 1.16 1.17
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Mar 6 10:04:04 EST 2009
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv12964/Source
Modified Files:
cmMessageCommand.cxx cmMessageCommand.h
Log Message:
ENH: Teach message() how to display warnings
This adds message(WARNING) and message(AUTHOR_WARNING) command modes and
fully documents the command behavior in all modes.
Index: cmMessageCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMessageCommand.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -C 2 -d -r1.16 -r1.17
*** cmMessageCommand.h 23 Jan 2008 15:27:59 -0000 1.16
--- cmMessageCommand.h 6 Mar 2009 15:04:02 -0000 1.17
***************
*** 66,79 ****
{
return
! " message([SEND_ERROR | STATUS | FATAL_ERROR]\n"
" \"message to display\" ...)\n"
! "By default the message is displayed in a pop up window (CMakeSetup), "
! "or in the stdout of cmake, or the error section of ccmake. "
! "If the first argument is "
! "SEND_ERROR then an error is raised, and the generate phase will "
! "be skipped. If the first argument is FATAL_ERROR, all processing "
! "is halted. If the first argument is STATUS then the message is "
! "displayed in the progress line for the GUI, or with a -- in the "
! "command line cmake.";
}
--- 66,91 ----
{
return
! " message([STATUS|WARNING|AUTHOR_WARNING|FATAL_ERROR|SEND_ERROR]\n"
" \"message to display\" ...)\n"
! "The optional keyword determines the type of message:\n"
! " (none) = Important information\n"
! " STATUS = Incidental information\n"
! " 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. "
! "The CMake GUI displays all messages in its log area. "
! "The interactive dialogs (ccmake and CMakeSetup) show STATUS messages "
! "one at a time on a status line and other messages in interactive "
! "pop-up boxes."
! "\n"
! "CMake Warning and Error message text displays using a simple "
! "markup language. "
! "Non-indented text is formatted in line-wrapped paragraphs delimited "
! "by newlines. "
! "Indented text is considered pre-formatted."
! ;
}
Index: cmMessageCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMessageCommand.cxx,v
retrieving revision 1.23
retrieving revision 1.24
diff -C 2 -d -r1.23 -r1.24
*** cmMessageCommand.cxx 14 Apr 2008 13:20:16 -0000 1.23
--- cmMessageCommand.cxx 6 Mar 2009 15:04:01 -0000 1.24
***************
*** 29,55 ****
std::vector<std::string>::const_iterator i = args.begin();
! bool send_error = false;
! bool fatal_error = false;
bool status = false;
! if (*i == "SEND_ERROR")
{
! send_error = true;
++i;
}
! else
{
! if (*i == "STATUS")
! {
! status = true;
! ++i;
! }
! else
! {
! if (*i == "FATAL_ERROR")
! {
! fatal_error = true;
! ++i;
! }
! }
}
--- 29,53 ----
std::vector<std::string>::const_iterator i = args.begin();
! cmake::MessageType type = cmake::MESSAGE;
bool status = false;
! if (*i == "SEND_ERROR" || *i == "FATAL_ERROR")
{
! type = cmake::FATAL_ERROR;
++i;
}
! else if (*i == "WARNING")
{
! type = cmake::WARNING;
! ++i;
! }
! else if (*i == "AUTHOR_WARNING")
! {
! type = cmake::AUTHOR_WARNING;
! ++i;
! }
! else if (*i == "STATUS")
! {
! status = true;
! ++i;
}
***************
*** 59,65 ****
}
! if (send_error || fatal_error)
{
! this->Makefile->IssueMessage(cmake::FATAL_ERROR, message.c_str());
}
else
--- 57,63 ----
}
! if (type != cmake::MESSAGE)
{
! this->Makefile->IssueMessage(type, message.c_str());
}
else
***************
*** 74,81 ****
}
}
- if(fatal_error )
- {
- cmSystemTools::SetFatalErrorOccured();
- }
return true;
}
--- 72,75 ----
More information about the Cmake-commits
mailing list