summaryrefslogtreecommitdiffstats
path: root/Source/cmListFileCache.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2008-03-07 16:43:47 (GMT)
committerKen Martin <ken.martin@kitware.com>2008-03-07 16:43:47 (GMT)
commit55eede4b131e39cc341832cd99d3b339f040af75 (patch)
tree7a36fdcf05163e4a35e2c0ecc3b91d017afe7236 /Source/cmListFileCache.cxx
parent497779d4b3be8ac387690bc95fdadab122fa5a3c (diff)
downloadCMake-55eede4b131e39cc341832cd99d3b339f040af75.zip
CMake-55eede4b131e39cc341832cd99d3b339f040af75.tar.gz
CMake-55eede4b131e39cc341832cd99d3b339f040af75.tar.bz2
ENH: clean up some policy stuff and interactions with CMAKE_BACKWARDS_COMPATIBILITY and CMAKE_MINIMUM_REQUIRED
Diffstat (limited to 'Source/cmListFileCache.cxx')
-rw-r--r--Source/cmListFileCache.cxx31
1 files changed, 5 insertions, 26 deletions
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index 34798f5..234c8e5 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -134,22 +134,15 @@ bool cmListFile::ParseFile(const char* filename,
hasPolicy = true;
break;
}
+ if (cmSystemTools::LowerCase(i->Name) == "cmake_minimum_required")
+ {
+ hasPolicy = true;
+ break;
+ }
}
// if no policy command is found this is an error
if(!hasPolicy)
{
- // add in the old CMAKE_BACKWARDS_COMPATIBILITY var for old CMake compatibility
- if (!mf->GetCacheManager()->
- GetCacheValue("CMAKE_BACKWARDS_COMPATIBILITY"))
- {
- mf->AddCacheDefinition
- ("CMAKE_BACKWARDS_COMPATIBILITY", "2.5",
- "For backwards compatibility, what version of CMake "
- "commands and "
- "syntax should this version of CMake try to support.",
- cmCacheManager::STRING);
- }
-
switch (mf->GetPolicyStatus(cmPolicies::CMP_0000))
{
case cmPolicies::WARN:
@@ -165,20 +158,6 @@ bool cmListFile::ParseFile(const char* filename,
return false;
}
}
- else
- {
- // add in the old CMAKE_BACKWARDS_COMPATIBILITY var for old CMake compatibility
- if (!mf->GetCacheManager()->
- GetCacheValue("CMAKE_BACKWARDS_COMPATIBILITY"))
- {
- mf->AddCacheDefinition
- ("CMAKE_BACKWARDS_COMPATIBILITY", "2.5",
- "For backwards compatibility, what version of CMake "
- "commands and "
- "syntax should this version of CMake try to support.",
- cmCacheManager::INTERNAL);
- }
- }
}
if(topLevel)