[Cmake-commits] [cmake-commits] king committed cmCMakeMinimumRequired.cxx 1.14 1.15 cmCMakeMinimumRequired.h 1.10 1.11

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Mar 4 18:42:08 EST 2008


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

Modified Files:
	cmCMakeMinimumRequired.cxx cmCMakeMinimumRequired.h 
Log Message:
ENH: Make CMAKE_MINIMUM_REQUIRED command FATAL_ERROR option implicit (always on).  Accept but ignore the existing option.


Index: cmCMakeMinimumRequired.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCMakeMinimumRequired.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C 2 -d -r1.10 -r1.11
*** cmCMakeMinimumRequired.h	23 Jan 2008 15:27:59 -0000	1.10
--- cmCMakeMinimumRequired.h	4 Mar 2008 23:42:06 -0000	1.11
***************
*** 67,76 ****
      {
      return
!       "  cmake_minimum_required(VERSION versionNumber [FATAL_ERROR])\n"
!       "Let cmake know that the project requires a certain version of a "
!       "cmake, or newer.  CMake will also try to be backwards compatible to "
!       "the version of cmake specified, if a newer version of cmake is "
!       "running.  If FATAL_ERROR is given then failure to meet the "
!       "requirements will be considered an error instead of a warning.";
      }
    
--- 67,77 ----
      {
      return
!       "  cmake_minimum_required(VERSION major[.minor[.patch]]\n"
!       "                         [FATAL_ERROR])\n"
!       "If the current version of CMake is lower than that required "
!       "it will stop processing the project and report an error.\n"
!       "The FATAL_ERROR option is accepted but ignored.  It is left from "
!       "CMake versions 2.4 and lower in which failure to meet the minimum "
!       "version was a warning by default.";
      }
    

Index: cmCMakeMinimumRequired.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCMakeMinimumRequired.cxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -C 2 -d -r1.14 -r1.15
*** cmCMakeMinimumRequired.cxx	4 Mar 2008 19:51:25 -0000	1.14
--- cmCMakeMinimumRequired.cxx	4 Mar 2008 23:42:06 -0000	1.15
***************
*** 26,30 ****
    std::string version_string;
    bool doing_version = false;
-   bool fatal_error = false;
    for(unsigned int i=0; i < args.size(); ++i)
      {
--- 26,29 ----
***************
*** 41,45 ****
          }
        doing_version = false;
-       fatal_error = true;
        }
      else if(doing_version)
--- 40,43 ----
***************
*** 102,109 ****
      // The current version is too low.
      cmOStringStream e;
-     if(!fatal_error)
-       {
-       e << "WARNING: ";
-       }
      e << "This project requires version " << version_string.c_str()
        << " of CMake.  "
--- 100,103 ----
***************
*** 111,123 ****
        << current_major << "." << current_minor << "." << current_patch
        << ".\n";
!     if(fatal_error)
!       {
!       cmSystemTools::Error(e.str().c_str());
!       cmSystemTools::SetFatalErrorOccured();
!       }
!     else
!       {
!       cmSystemTools::Message(e.str().c_str());
!       }
      }
  
--- 105,110 ----
        << current_major << "." << current_minor << "." << current_patch
        << ".\n";
!     cmSystemTools::Error(e.str().c_str());
!     cmSystemTools::SetFatalErrorOccured();
      }
  



More information about the Cmake-commits mailing list