[Cmake-commits] [cmake-commits] david.cole committed cmGlobalXCodeGenerator.cxx 1.204 1.205 cmLocalGenerator.cxx 1.288 1.289

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Jan 27 10:30:58 EST 2009


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

Modified Files:
	cmGlobalXCodeGenerator.cxx cmLocalGenerator.cxx 
Log Message:
BUG: Fix issue #6195. Add CMAKE_OSX_DEPLOYMENT_TARGET cache variable to specify the target deployment runtime OS version of the built executables on Mac OSX. Thanks to Mike Jackson for the patch.


Index: cmGlobalXCodeGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalXCodeGenerator.cxx,v
retrieving revision 1.204
retrieving revision 1.205
diff -C 2 -d -r1.204 -r1.205
*** cmGlobalXCodeGenerator.cxx	20 Jan 2009 20:49:37 -0000	1.204
--- cmGlobalXCodeGenerator.cxx	27 Jan 2009 15:30:54 -0000	1.205
***************
*** 2478,2481 ****
--- 2478,2483 ----
    const char* sysrootDefault = 
      this->CurrentMakefile->GetDefinition("CMAKE_OSX_SYSROOT_DEFAULT");
+   const char* deploymentTarget = 
+     this->CurrentMakefile->GetDefinition("CMAKE_OSX_DEPLOYMENT_TARGET");
    if(osxArch && sysroot)
      {
***************
*** 2519,2522 ****
--- 2521,2529 ----
        }
      }
+   if(deploymentTarget && *deploymentTarget)
+     {
+     buildSettings->AddAttribute("MACOSX_DEPLOYMENT_TARGET",
+                                 this->CreateString(deploymentTarget));
+     }
    for( std::vector<cmXCodeObject*>::iterator i = configs.begin();
         i != configs.end(); ++i)

Index: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.288
retrieving revision 1.289
diff -C 2 -d -r1.288 -r1.289
*** cmLocalGenerator.cxx	16 Dec 2008 14:15:18 -0000	1.288
--- cmLocalGenerator.cxx	27 Jan 2009 15:30:55 -0000	1.289
***************
*** 1686,1689 ****
--- 1686,1690 ----
    flagsVar += lang;
    flagsVar += "_FLAGS";
+ 
    if(this->EmitUniversalBinaryFlags)
      {
***************
*** 1694,1700 ****
      const char* sysrootDefault = 
        this->Makefile->GetDefinition("CMAKE_OSX_SYSROOT_DEFAULT");
      bool flagsUsed = false;
!     if(osxArch && sysroot  && lang && (lang[0] =='C' || lang[0] == 'F'))
!       { 
        std::vector<std::string> archs;
        cmSystemTools::ExpandListArgument(std::string(osxArch),
--- 1695,1705 ----
      const char* sysrootDefault = 
        this->Makefile->GetDefinition("CMAKE_OSX_SYSROOT_DEFAULT");
+     const char* deploymentTarget = 
+       this->Makefile->GetDefinition("CMAKE_OSX_DEPLOYMENT_TARGET");
+ 
      bool flagsUsed = false;
! 
!     if(osxArch && sysroot && lang && (lang[0] =='C' || lang[0] == 'F'))
!       {
        std::vector<std::string> archs;
        cmSystemTools::ExpandListArgument(std::string(osxArch),
***************
*** 1705,1708 ****
--- 1710,1714 ----
          const char* archOrig = 
            this->Makefile->GetSafeDefinition("CMAKE_OSX_ARCHITECTURES_DEFAULT");
+ 
          if(archs[0] == archOrig)
            {
***************
*** 1722,1730 ****
--- 1728,1739 ----
            flags += *i;
            }
+ 
          flags += " -isysroot ";
          flags += sysroot;
+ 
          flagsUsed = true;
          }
        }
+ 
      if(!flagsUsed && sysroot && sysrootDefault &&
         strcmp(sysroot, sysrootDefault) != 0)
***************
*** 1733,1737 ****
--- 1742,1754 ----
        flags += sysroot;
        }
+ 
+     if (deploymentTarget && *deploymentTarget &&
+         lang && (lang[0] =='C' || lang[0] == 'F'))
+       {
+       flags += " -mmacosx-version-min=";
+       flags += deploymentTarget;
+       }
      }
+ 
    this->AddConfigVariableFlags(flags, flagsVar.c_str(), config);
  }



More information about the Cmake-commits mailing list