summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-05-29 15:14:05 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-05-29 15:14:05 (GMT)
commit1e09bc5dde0dd4419861e510ea339ecf98a580a0 (patch)
tree7c422e3c562b20a55beb5c80f4c6e2273e632673 /Source/cmake.cxx
parent0876c19dc89c0785ffe491aa095c231709cc5c7a (diff)
downloadCMake-1e09bc5dde0dd4419861e510ea339ecf98a580a0.zip
CMake-1e09bc5dde0dd4419861e510ea339ecf98a580a0.tar.gz
CMake-1e09bc5dde0dd4419861e510ea339ecf98a580a0.tar.bz2
ENH: Abstract pre configure check in a separate method
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx16
1 files changed, 15 insertions, 1 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 3cf1149..9ddbb7a 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -784,7 +784,7 @@ void cmake::SetGlobalGenerator(cmGlobalGenerator *gg)
gg->SetCMakeInstance(this);
}
-int cmake::Configure()
+int cmake::DoPreConfigureChecks()
{
// do a sanity check on some values
if(m_CacheManager->GetCacheValue("CMAKE_HOME_DIRECTORY"))
@@ -807,6 +807,20 @@ int cmake::Configure()
}
else
{
+ return 0;
+ }
+ return 1;
+}
+
+int cmake::Configure()
+{
+ int res = this->DoPreConfigureChecks();
+ if ( res < 0 )
+ {
+ return -2;
+ }
+ if ( !res )
+ {
m_CacheManager->AddCacheEntry("CMAKE_HOME_DIRECTORY",
this->GetHomeDirectory(),
"Start directory with the top level CMakeLists.txt file for this project",