diff options
author | Ken Martin <ken.martin@kitware.com> | 2008-03-07 16:43:47 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2008-03-07 16:43:47 (GMT) |
commit | 55eede4b131e39cc341832cd99d3b339f040af75 (patch) | |
tree | 7a36fdcf05163e4a35e2c0ecc3b91d017afe7236 /Source/cmake.cxx | |
parent | 497779d4b3be8ac387690bc95fdadab122fa5a3c (diff) | |
download | CMake-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/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 31693d2..e9d92b3 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1899,6 +1899,19 @@ int cmake::ActualConfigure() cmCacheManager::INTERNAL); } + // set the default BACKWARDS compatibility to the current version + if(!this->CacheManager->GetCacheValue("CMAKE_BACKWARDS_COMPATIBILITY")) + { + char ver[256]; + sprintf(ver,"%i.%i",cmVersion::GetMajorVersion(), + cmVersion::GetMinorVersion()); + this->CacheManager->AddCacheEntry + ("CMAKE_BACKWARDS_COMPATIBILITY",ver, + "For backwards compatibility, what version of CMake commands and " + "syntax should this version of CMake allow.", + cmCacheManager::INTERNAL); + } + // no generator specified on the command line if(!this->GlobalGenerator) { @@ -2380,6 +2393,19 @@ int cmake::LoadCache() return -3; } + // set the default BACKWARDS compatibility to the current version + if(!this->CacheManager->GetCacheValue("CMAKE_BACKWARDS_COMPATIBILITY")) + { + char ver[256]; + sprintf(ver,"%i.%i",cmVersion::GetMajorVersion(), + cmVersion::GetMinorVersion()); + this->CacheManager->AddCacheEntry + ("CMAKE_BACKWARDS_COMPATIBILITY",ver, + "For backwards compatibility, what version of CMake commands and " + "syntax should this version of CMake allow.", + cmCacheManager::INTERNAL); + } + return 0; } |