summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-05-13 20:11:14 (GMT)
committerBrad King <brad.king@kitware.com>2003-05-13 20:11:14 (GMT)
commit20b198835cd9d58fd1e98dc2c6858659a3c9b288 (patch)
treea1f6ede6109b7e7ee455b568cfcdae716f5499fa /Source/cmake.cxx
parenta30148e640035b3cf03c9b6deded931eda5c1eb0 (diff)
downloadCMake-20b198835cd9d58fd1e98dc2c6858659a3c9b288.zip
CMake-20b198835cd9d58fd1e98dc2c6858659a3c9b288.tar.gz
CMake-20b198835cd9d58fd1e98dc2c6858659a3c9b288.tar.bz2
ENH: When the initially configured generator is invalid, allow the user to change the generator without deleting the cache by hand.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 813a39d..f4d3372 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -890,6 +890,14 @@ int cmake::Configure()
cmCacheManager::PATH);
}
+ if(cmSystemTools::GetFatalErrorOccured() &&
+ (!this->m_CacheManager->GetCacheValue("CMAKE_MAKE_PROGRAM") ||
+ cmSystemTools::IsOff(this->m_CacheManager->GetCacheValue("CMAKE_MAKE_PROGRAM"))))
+ {
+ // We must have a bad generator selection. Wipe the cache entry so the
+ // user can select another.
+ m_CacheManager->RemoveCacheEntry("CMAKE_GENERATOR");
+ }
this->m_CacheManager->SaveCache(this->GetHomeOutputDirectory());
if(cmSystemTools::GetErrorOccuredFlag())
{