BUG: change in handling of cmake_minimum_required
This commit is contained in:
parent
385377cf1c
commit
5588ed47fc
|
@ -47,9 +47,20 @@ bool cmConfigureFileCommand
|
||||||
const char* versionValue
|
const char* versionValue
|
||||||
= this->Makefile->GetDefinition("CMAKE_BACKWARDS_COMPATIBILITY");
|
= this->Makefile->GetDefinition("CMAKE_BACKWARDS_COMPATIBILITY");
|
||||||
if (versionValue && atof(versionValue) > 2.0)
|
if (versionValue && atof(versionValue) > 2.0)
|
||||||
{
|
{
|
||||||
this->Immediate = true;
|
this->Immediate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP_0003))
|
||||||
|
{
|
||||||
|
case cmPolicies::WARN:
|
||||||
|
case cmPolicies::OLD:
|
||||||
|
break;
|
||||||
|
case cmPolicies::NEW:
|
||||||
|
case cmPolicies::REQUIRED_IF_USED:
|
||||||
|
case cmPolicies::REQUIRED_ALWAYS:
|
||||||
|
this->Immediate = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
this->AtOnly = false;
|
this->AtOnly = false;
|
||||||
|
|
|
@ -134,11 +134,6 @@ bool cmListFile::ParseFile(const char* filename,
|
||||||
hasPolicy = true;
|
hasPolicy = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (cmSystemTools::LowerCase(i->Name) == "cmake_minimum_required")
|
|
||||||
{
|
|
||||||
hasPolicy = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// if no policy command is found this is an error
|
// if no policy command is found this is an error
|
||||||
if(!hasPolicy)
|
if(!hasPolicy)
|
||||||
|
@ -148,7 +143,7 @@ bool cmListFile::ParseFile(const char* filename,
|
||||||
GetCacheValue("CMAKE_BACKWARDS_COMPATIBILITY"))
|
GetCacheValue("CMAKE_BACKWARDS_COMPATIBILITY"))
|
||||||
{
|
{
|
||||||
mf->AddCacheDefinition
|
mf->AddCacheDefinition
|
||||||
("CMAKE_BACKWARDS_COMPATIBILITY", "2.6",
|
("CMAKE_BACKWARDS_COMPATIBILITY", "2.4",
|
||||||
"For backwards compatibility, what version of CMake commands and "
|
"For backwards compatibility, what version of CMake commands and "
|
||||||
"syntax should this version of CMake try to support.",
|
"syntax should this version of CMake try to support.",
|
||||||
cmCacheManager::STRING);
|
cmCacheManager::STRING);
|
||||||
|
|
|
@ -120,7 +120,7 @@ cmPolicies::cmPolicies()
|
||||||
"In CMake 2.2 and later the default behavior is that it will "
|
"In CMake 2.2 and later the default behavior is that it will "
|
||||||
"configure the file right when the command is invoked."
|
"configure the file right when the command is invoked."
|
||||||
,
|
,
|
||||||
2,2,0, cmPolicies::NEW);
|
2,6,0, cmPolicies::NEW);
|
||||||
// this->PolicyStringMap["CMP_CONFIGURE_FILE_IMMEDIATE"] = CMP_0003;
|
// this->PolicyStringMap["CMP_CONFIGURE_FILE_IMMEDIATE"] = CMP_0003;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue