summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmake.cxx16
-rw-r--r--Source/cmake.h3
2 files changed, 18 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",
diff --git a/Source/cmake.h b/Source/cmake.h
index 53f2b07..f01c065 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -235,6 +235,9 @@ class cmake
cmVariableWatch* GetVariableWatch() { return m_VariableWatch; }
void GetCommandDocumentation(std::vector<cmDocumentationEntry>&) const;
+
+ ///! Do all the checks before running configure
+ int DoPreConfigureChecks();
protected:
typedef std::map<cmStdString, cmCommand*> RegisteredCommandsMap;