[Cmake-commits] [cmake-commits] hoffman committed cmLocalUnixMakefileGenerator3.cxx 1.239 1.240 cmMakefile.cxx 1.459 1.460 cmSourceFileLocation.cxx 1.2 1.3 cmTarget.cxx 1.205 1.206 cmake.h 1.107 1.108

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Mar 12 21:06:34 EDT 2008


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

Modified Files:
	cmLocalUnixMakefileGenerator3.cxx cmMakefile.cxx 
	cmSourceFileLocation.cxx cmTarget.cxx cmake.h 
Log Message:
ENH: remove abort calls and replace with an IssueMessage INTERANL_ERROR, better to not crash on the end user.


Index: cmake.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.h,v
retrieving revision 1.107
retrieving revision 1.108
diff -C 2 -d -r1.107 -r1.108
*** cmake.h	12 Mar 2008 21:02:30 -0000	1.107
--- cmake.h	13 Mar 2008 01:06:32 -0000	1.108
***************
*** 62,65 ****
--- 62,66 ----
    { AUTHOR_WARNING,
      FATAL_ERROR,
+     INTERNAL_ERROR,
      MESSAGE,
      WARNING,

Index: cmSourceFileLocation.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSourceFileLocation.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** cmSourceFileLocation.cxx	18 Jun 2007 15:59:23 -0000	1.2
--- cmSourceFileLocation.cxx	13 Mar 2008 01:06:32 -0000	1.3
***************
*** 174,178 ****
      // This can occur when referencing a source file from a different
      // directory.  This is not yet allowed.
!     abort();
      }
    else if(this->AmbiguousDirectory)
--- 174,184 ----
      // This can occur when referencing a source file from a different
      // directory.  This is not yet allowed.
!     this->Makefile->
!       IssueMessage(cmake::INTERNAL_ERROR,
!                    "Matches error: Each side has a directory relative to a different"
!                    " location. This can occur when referencing a "
!                    "source file from a different directory.  "
!                    "This is not yet allowed.");
!     return false;
      }
    else if(this->AmbiguousDirectory)

Index: cmLocalUnixMakefileGenerator3.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalUnixMakefileGenerator3.cxx,v
retrieving revision 1.239
retrieving revision 1.240
diff -C 2 -d -r1.239 -r1.240
*** cmLocalUnixMakefileGenerator3.cxx	11 Mar 2008 21:53:54 -0000	1.239
--- cmLocalUnixMakefileGenerator3.cxx	13 Mar 2008 01:06:32 -0000	1.240
***************
*** 1916,1920 ****
    if(source.GetProperty("MACOSX_PACKAGE_LOCATION"))
      {
!     abort();
      }
  
--- 1916,1923 ----
    if(source.GetProperty("MACOSX_PACKAGE_LOCATION"))
      {
!     std::string msg = "MACOSX_PACKAGE_LOCATION set on source file: ";
!     msg += source.GetFullPath();
!     this->GetMakefile()->IssueMessage(cmake::INTERNAL_ERROR,
!                                       msg.c_str());
      }
  

Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.205
retrieving revision 1.206
diff -C 2 -d -r1.205 -r1.206
*** cmTarget.cxx	4 Mar 2008 18:51:27 -0000	1.205
--- cmTarget.cxx	13 Mar 2008 01:06:32 -0000	1.206
***************
*** 644,648 ****
       type == cmTarget::INSTALL_DIRECTORY)
      {
!     abort();
      }
    // only add dependency information for library targets
--- 644,652 ----
       type == cmTarget::INSTALL_DIRECTORY)
      {
!     this->Makefile->
!       IssueMessage(cmake::INTERNAL_ERROR,
!                    "SetType called on cmTarget for INSTALL_FILES, "
!                    "INSTALL_PROGRAMS, or INSTALL_DIRECTORY ");
!     return;
      }
    // only add dependency information for library targets
***************
*** 2100,2104 ****
    if(this->IsImported())
      {
!     abort();
      }
  
--- 2104,2112 ----
    if(this->IsImported())
      {
!     std::string msg =  "NormalGetRealName called on imported target: ";
!     msg += this->GetName();
!     this->GetMakefile()->
!       IssueMessage(cmake::INTERNAL_ERROR,
!                    msg.c_str());
      }
  
***************
*** 2425,2429 ****
    if(this->IsImported())
      {
!     abort();
      }
  
--- 2433,2441 ----
    if(this->IsImported())
      {
!     std::string msg =  "GetLibraryNamesInternal called on imported target: ";
!     msg += this->GetName();
!     this->Makefile->IssueMessage(cmake::INTERNAL_ERROR,
!                                  msg.c_str());
!     return;
      }
  
***************
*** 2554,2558 ****
    if(this->IsImported())
      {
!     abort();
      }
  
--- 2566,2574 ----
    if(this->IsImported())
      {
!     std::string msg =  "GetExecutableNamesInternal called on imported target: ";
!     msg += this->GetName();
!     this->GetMakefile()->
!       IssueMessage(cmake::INTERNAL_ERROR,
!                    msg.c_str());
      }
  
***************
*** 2829,2837 ****
       !this->Makefile->GetDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX"))
      {
!     abort();
      }
    if(implib && !this->DLLPlatform)
      {
!     abort();
      }
  
--- 2845,2863 ----
       !this->Makefile->GetDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX"))
      {
!     std::string msg =  "GetAndCreateOutputDir, imlib set but there is no "
!       "CMAKE_IMPORT_LIBRARY_SUFFIX for target: ";
!     msg += this->GetName();
!     this->GetMakefile()->
!       IssueMessage(cmake::INTERNAL_ERROR,
!                    msg.c_str());
      }
    if(implib && !this->DLLPlatform)
      {
!     std::string msg =  "implib set for platform that does not "
!       " support DLL's for target: ";
!     msg += this->GetName();
!     this->GetMakefile()->
!       IssueMessage(cmake::INTERNAL_ERROR,
!                    msg.c_str());
      }
  

Index: cmMakefile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.cxx,v
retrieving revision 1.459
retrieving revision 1.460
diff -C 2 -d -r1.459 -r1.460
*** cmMakefile.cxx	12 Mar 2008 13:25:14 -0000	1.459
--- cmMakefile.cxx	13 Mar 2008 01:06:32 -0000	1.460
***************
*** 296,299 ****
--- 296,304 ----
      msg << "CMake Error:";
      }
+   else if(t == cmake::INTERNAL_ERROR)
+     {
+     isError = true;
+     msg << "CMake Internal Error, please report a bug: ";
+     }
    else
      {
***************
*** 2030,2034 ****
        // This case should never be called.  At-only is for
        // configure-file/string which always does no escapes.
!       abort();
        }
  
--- 2035,2041 ----
        // This case should never be called.  At-only is for
        // configure-file/string which always does no escapes.
!       this->IssueMessage(cmake::INTERNAL_ERROR,
!                          "ExpandVariablesInString @ONLY called "
!                          "on something with escapes.");
        }
  



More information about the Cmake-commits mailing list