[Cmake-commits] [cmake-commits] martink committed cmCMakeMinimumRequired.cxx 1.13 1.14 cmPolicies.cxx 1.5 1.6 cmake.cxx 1.363 1.364

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Mar 4 14:51:27 EST 2008


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv11603

Modified Files:
	cmCMakeMinimumRequired.cxx cmPolicies.cxx cmake.cxx 
Log Message:
ENH: more policy changes


Index: cmCMakeMinimumRequired.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCMakeMinimumRequired.cxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -C 2 -d -r1.13 -r1.14
*** cmCMakeMinimumRequired.cxx	23 Jan 2008 15:27:59 -0000	1.13
--- cmCMakeMinimumRequired.cxx	4 Mar 2008 19:51:25 -0000	1.14
***************
*** 122,125 ****
--- 122,128 ----
      }
  
+   // set the policy version as well
+   this->Makefile->SetPolicyVersion(version_string.c_str());
+ 
    return true;
  }

Index: cmake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.cxx,v
retrieving revision 1.363
retrieving revision 1.364
diff -C 2 -d -r1.363 -r1.364
*** cmake.cxx	4 Mar 2008 14:16:33 -0000	1.363
--- cmake.cxx	4 Mar 2008 19:51:25 -0000	1.364
***************
*** 1900,1916 ****
      }
  
-   // 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::STRING);
-     }
- 
    // no generator specified on the command line
    if(!this->GlobalGenerator)
--- 1900,1903 ----
***************
*** 2394,2410 ****
      }
  
-   // 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::STRING);
-     }
- 
    return 0;
  }
--- 2381,2384 ----

Index: cmPolicies.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmPolicies.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -C 2 -d -r1.5 -r1.6
*** cmPolicies.cxx	4 Mar 2008 14:16:33 -0000	1.5
--- cmPolicies.cxx	4 Mar 2008 19:51:25 -0000	1.6
***************
*** 185,189 ****
      patchVer = atoi(patch.c_str());
    }
!  
    // now loop over all the policies and set them as appropriate
    std::map<cmPolicies::PolicyID,cmPolicy *>::iterator i 
--- 185,203 ----
      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 



More information about the Cmake-commits mailing list