[Cmake-commits] [cmake-commits] martink committed cmConfigureFileCommand.cxx 1.30 1.31 cmMakefile.cxx 1.443 1.444 cmPolicies.cxx 1.6 1.7 cmPolicies.h 1.6 1.7

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Mar 5 11:41:29 EST 2008


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

Modified Files:
	cmConfigureFileCommand.cxx cmMakefile.cxx cmPolicies.cxx 
	cmPolicies.h 
Log Message:
BUG: some fixes, still a few to go


Index: cmConfigureFileCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmConfigureFileCommand.cxx,v
retrieving revision 1.30
retrieving revision 1.31
diff -C 2 -d -r1.30 -r1.31
*** cmConfigureFileCommand.cxx	23 Jan 2008 15:27:59 -0000	1.30
--- cmConfigureFileCommand.cxx	5 Mar 2008 16:41:18 -0000	1.31
***************
*** 43,55 ****
    
    // for CMake 2.0 and earlier CONFIGURE_FILE defaults to the FinalPass,
!   // after 2.0 it only does InitialPass
!   this->Immediate = false;
!   const char* versionValue
!     = this->Makefile->GetDefinition("CMAKE_BACKWARDS_COMPATIBILITY");
!   if (versionValue && atof(versionValue) > 2.0)
!     {
!     this->Immediate = true;
!     }
! 
    
    this->AtOnly = false;
--- 43,59 ----
    
    // for CMake 2.0 and earlier CONFIGURE_FILE defaults to the FinalPass,
!   // after 2.0 it only does InitialPass, this is policy CMP_0003
!   switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP_0003))
!   {
!     case cmPolicies::WARN:
!       cmSystemTools::Message(
!         this->Makefile->GetPolicies()->GetPolicyWarning
!             (cmPolicies::CMP_0003).c_str(),"Warning");
!     case cmPolicies::OLD:
!       this->Immediate = false;
!       break; 
!     default:
!       this->Immediate = true;
!   }
    
    this->AtOnly = false;

Index: cmPolicies.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmPolicies.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C 2 -d -r1.6 -r1.7
*** cmPolicies.h	4 Mar 2008 14:16:33 -0000	1.6
--- cmPolicies.h	5 Mar 2008 16:41:25 -0000	1.7
***************
*** 41,45 ****
    enum PolicyID {CMP_0000, CMP_POLICY_SPECIFICATION = CMP_0000,
                   CMP_0001, CMP_TARGET_NAMES_WITH_SLASHES = CMP_0001,
!                  CMP_0002, CMP_REQUIRE_UNIQUE_TARGET_NAMES = CMP_0002};
  
  
--- 41,47 ----
    enum PolicyID {CMP_0000, CMP_POLICY_SPECIFICATION = CMP_0000,
                   CMP_0001, CMP_TARGET_NAMES_WITH_SLASHES = CMP_0001,
!                  CMP_0002, CMP_REQUIRE_UNIQUE_TARGET_NAMES = CMP_0002,
!                  CMP_0003, CMP_CONFIGURE_FILE_IMMEDIATE = CMP_0003
!                  };
  
  

Index: cmPolicies.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmPolicies.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -C 2 -d -r1.6 -r1.7
*** cmPolicies.cxx	4 Mar 2008 19:51:25 -0000	1.6
--- cmPolicies.cxx	5 Mar 2008 16:41:24 -0000	1.7
***************
*** 113,117 ****
    this->PolicyStringMap["CMP_REQUIRE_UNIQUE_TARGET_NAMES"] = CMP_0002;
  
! }
  
  cmPolicies::~cmPolicies()
--- 113,127 ----
    this->PolicyStringMap["CMP_REQUIRE_UNIQUE_TARGET_NAMES"] = CMP_0002;
  
!   this->DefinePolicy(CMP_0003, "CMP_0003",
!     "CMake configures file immediately after 2.0.",
!     "In CMake 2.0 and earlier the configure_file command would not "
!     "configure the file until after processing all CMakeLists files. "
!     "In CMake 2.2 and later the default behavior is that it will "
!     "configure the file right when the command is invoked."
!     ,
!     2,2,0, cmPolicies::NEW);
!   this->PolicyStringMap["CMP_CONFIGURE_FILE_IMMEDIATE"] = CMP_0003;
! 
!   }
  
  cmPolicies::~cmPolicies()
***************
*** 189,193 ****
    if ((majorVer == 2 && minorVer <= 4) || majorVer < 2)
    {
!     if (!mf->GetCacheManager()->GetCacheValue("CMAKE_BACKWARDS_COMPATIBILITY"))
      {
        mf->AddCacheDefinition
--- 199,204 ----
    if ((majorVer == 2 && minorVer <= 4) || majorVer < 2)
    {
!     if (!mf->GetCacheManager()->
!         GetCacheValue("CMAKE_BACKWARDS_COMPATIBILITY"))
      {
        mf->AddCacheDefinition

Index: cmMakefile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.cxx,v
retrieving revision 1.443
retrieving revision 1.444
diff -C 2 -d -r1.443 -r1.444
*** cmMakefile.cxx	4 Mar 2008 23:57:14 -0000	1.443
--- cmMakefile.cxx	5 Mar 2008 16:41:19 -0000	1.444
***************
*** 139,142 ****
--- 139,143 ----
    this->ListFileStack = mf.ListFileStack;
    this->Initialize();
+   this->PushPolicy();
  }
  
***************
*** 208,211 ****
--- 209,213 ----
      }
    this->FunctionBlockers.clear();
+   this->PolicyStack.pop_back();
  }
  
***************
*** 3246,3250 ****
  
    // check our policy stack first
!   for (vecpos = static_cast<int>(this->PolicyStack.size()); 
         vecpos >= 0 && !done; vecpos--)
    {
--- 3248,3252 ----
  
    // check our policy stack first
!   for (vecpos = static_cast<int>(this->PolicyStack.size()) - 1; 
         vecpos >= 0 && !done; vecpos--)
    {



More information about the Cmake-commits mailing list