diff options
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 5 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 9 | ||||
-rw-r--r-- | Source/cmSourceFileLocation.cxx | 8 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 38 | ||||
-rw-r--r-- | Source/cmake.h | 1 |
5 files changed, 52 insertions, 9 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 158a019..fc5acc9 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -1915,7 +1915,10 @@ cmLocalUnixMakefileGenerator3 // Make sure we never hit this old case. if(source.GetProperty("MACOSX_PACKAGE_LOCATION")) { - abort(); + std::string msg = "MACOSX_PACKAGE_LOCATION set on source file: "; + msg += source.GetFullPath(); + this->GetMakefile()->IssueMessage(cmake::INTERNAL_ERROR, + msg.c_str()); } // Start with the target directory. diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index c39599d..1960f04 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -295,6 +295,11 @@ void cmMakefile::IssueMessage(cmake::MessageType t, isError = true; msg << "CMake Error:"; } + else if(t == cmake::INTERNAL_ERROR) + { + isError = true; + msg << "CMake Internal Error, please report a bug: "; + } else { msg << "CMake Warning"; @@ -2029,7 +2034,9 @@ const char *cmMakefile::ExpandVariablesInString(std::string& source, { // This case should never be called. At-only is for // configure-file/string which always does no escapes. - abort(); + this->IssueMessage(cmake::INTERNAL_ERROR, + "ExpandVariablesInString @ONLY called " + "on something with escapes."); } // Store an original copy of the input. diff --git a/Source/cmSourceFileLocation.cxx b/Source/cmSourceFileLocation.cxx index 159f22f..71c2f8f 100644 --- a/Source/cmSourceFileLocation.cxx +++ b/Source/cmSourceFileLocation.cxx @@ -173,7 +173,13 @@ bool cmSourceFileLocation::Matches(cmSourceFileLocation const& loc) // 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. - abort(); + 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) { diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 33c3032..2d650ac 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -643,7 +643,11 @@ void cmTarget::SetType(TargetType type, const char* name) type == cmTarget::INSTALL_PROGRAMS || type == cmTarget::INSTALL_DIRECTORY) { - abort(); + 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 this->TargetTypeValue = type; @@ -2099,7 +2103,11 @@ std::string cmTarget::NormalGetRealName(const char* config) // enforcement of the limited imported target API. if(this->IsImported()) { - abort(); + std::string msg = "NormalGetRealName called on imported target: "; + msg += this->GetName(); + this->GetMakefile()-> + IssueMessage(cmake::INTERNAL_ERROR, + msg.c_str()); } if(this->GetType() == cmTarget::EXECUTABLE) @@ -2424,7 +2432,11 @@ void cmTarget::GetLibraryNamesInternal(std::string& name, // enforcement of the limited imported target API. if(this->IsImported()) { - abort(); + std::string msg = "GetLibraryNamesInternal called on imported target: "; + msg += this->GetName(); + this->Makefile->IssueMessage(cmake::INTERNAL_ERROR, + msg.c_str()); + return; } // Construct the name of the soname flag variable for this language. @@ -2553,7 +2565,11 @@ void cmTarget::GetExecutableNamesInternal(std::string& name, // enforcement of the limited imported target API. if(this->IsImported()) { - abort(); + std::string msg = "GetExecutableNamesInternal called on imported target: "; + msg += this->GetName(); + this->GetMakefile()-> + IssueMessage(cmake::INTERNAL_ERROR, + msg.c_str()); } // This versioning is supported only for executables and then only @@ -2828,11 +2844,21 @@ const char* cmTarget::GetAndCreateOutputDir(bool implib, bool create) if(implib && !this->Makefile->GetDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX")) { - abort(); + 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) { - abort(); + 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()); } // Select whether we are constructing the directory for the main diff --git a/Source/cmake.h b/Source/cmake.h index cb130bc..8630607 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -61,6 +61,7 @@ class cmake enum MessageType { AUTHOR_WARNING, FATAL_ERROR, + INTERNAL_ERROR, MESSAGE, WARNING, LOG |