diff options
author | Ken Martin <ken.martin@kitware.com> | 2008-03-04 19:51:25 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2008-03-04 19:51:25 (GMT) |
commit | cd4d2acbe654ca57a9ffc7ca34dcf4835bfc77c3 (patch) | |
tree | ae821b4f8be77edad7ecb3a009d01d5f2f7bcda5 /Source/cmPolicies.cxx | |
parent | 96ee85d1972ee54745637037a2d4dc1b1e7b885d (diff) | |
download | CMake-cd4d2acbe654ca57a9ffc7ca34dcf4835bfc77c3.zip CMake-cd4d2acbe654ca57a9ffc7ca34dcf4835bfc77c3.tar.gz CMake-cd4d2acbe654ca57a9ffc7ca34dcf4835bfc77c3.tar.bz2 |
ENH: more policy changes
Diffstat (limited to 'Source/cmPolicies.cxx')
-rw-r--r-- | Source/cmPolicies.cxx | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index 1f5da47..b7e07e1 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -184,7 +184,21 @@ bool cmPolicies::ApplyPolicyVersion(cmMakefile *mf, { patchVer = atoi(patch.c_str()); } - + + // add in the old CMAKE_BACKWARDS_COMPATIBILITY var for old CMake compatibility + if ((majorVer == 2 && minorVer <= 4) || majorVer < 2) + { + if (!mf->GetCacheManager()->GetCacheValue("CMAKE_BACKWARDS_COMPATIBILITY")) + { + mf->AddCacheDefinition + ("CMAKE_BACKWARDS_COMPATIBILITY",version, + "For backwards compatibility, what version of CMake commands and " + "syntax should this version of CMake try to support.", + cmCacheManager::STRING); + } + } + + // now loop over all the policies and set them as appropriate std::map<cmPolicies::PolicyID,cmPolicy *>::iterator i = this->Policies.begin(); |