summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-08-26 19:06:52 (GMT)
committerBrad King <brad.king@kitware.com>2003-08-26 19:06:52 (GMT)
commit41445f67aca14217f5e786b25ed5665b26d45ca8 (patch)
tree79a6e937f774a1bd2670430a3b14c0b2b58515d4 /Source/cmake.cxx
parentc59cc5a542ca78cba2983d91b588ae1f7ee490dd (diff)
downloadCMake-41445f67aca14217f5e786b25ed5665b26d45ca8.zip
CMake-41445f67aca14217f5e786b25ed5665b26d45ca8.tar.gz
CMake-41445f67aca14217f5e786b25ed5665b26d45ca8.tar.bz2
BUG: Fixed crash of cmake -i when CMAKE_ROOT cannot be found. Made resulting error message cleaner.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index c4c73dd..06370be 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -544,9 +544,10 @@ int cmake::AddCMakePaths(const char *arg0)
if (!cmSystemTools::FileExists(modules.c_str()))
{
// couldn't find modules
- cmSystemTools::Error("Could not find CMAKE_ROOT !!!\n",
- "Modules directory not in directory:\n",
- modules.c_str());
+ cmSystemTools::Error("Could not find CMAKE_ROOT !!!\n"
+ "CMake has most likely not been installed correctly.\n"
+ "Modules directory not found in\n",
+ cMakeRoot.c_str());
return 0;
}
this->m_CacheManager->AddCacheEntry
@@ -1058,6 +1059,10 @@ int cmake::Run(const std::vector<std::string>& args, bool noconfigure)
int cmake::Generate()
{
+ if(!m_GlobalGenerator)
+ {
+ return -1;
+ }
m_GlobalGenerator->Generate();
if(cmSystemTools::GetErrorOccuredFlag())
{