ENH: Abstract pre configure check in a separate method
This commit is contained in:
parent
0876c19dc8
commit
1e09bc5dde
@ -784,7 +784,7 @@ void cmake::SetGlobalGenerator(cmGlobalGenerator *gg)
|
|||||||
gg->SetCMakeInstance(this);
|
gg->SetCMakeInstance(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
int cmake::Configure()
|
int cmake::DoPreConfigureChecks()
|
||||||
{
|
{
|
||||||
// do a sanity check on some values
|
// do a sanity check on some values
|
||||||
if(m_CacheManager->GetCacheValue("CMAKE_HOME_DIRECTORY"))
|
if(m_CacheManager->GetCacheValue("CMAKE_HOME_DIRECTORY"))
|
||||||
@ -806,6 +806,20 @@ int cmake::Configure()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
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",
|
m_CacheManager->AddCacheEntry("CMAKE_HOME_DIRECTORY",
|
||||||
this->GetHomeDirectory(),
|
this->GetHomeDirectory(),
|
||||||
|
@ -236,6 +236,9 @@ class cmake
|
|||||||
|
|
||||||
void GetCommandDocumentation(std::vector<cmDocumentationEntry>&) const;
|
void GetCommandDocumentation(std::vector<cmDocumentationEntry>&) const;
|
||||||
|
|
||||||
|
///! Do all the checks before running configure
|
||||||
|
int DoPreConfigureChecks();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
typedef std::map<cmStdString, cmCommand*> RegisteredCommandsMap;
|
typedef std::map<cmStdString, cmCommand*> RegisteredCommandsMap;
|
||||||
RegisteredCommandsMap m_Commands;
|
RegisteredCommandsMap m_Commands;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user