[Cmake-commits] [cmake-commits] hoffman committed cmGlobalXCodeGenerator.cxx 1.224 1.225 cmLocalGenerator.cxx 1.309 1.310
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Sep 17 11:53:04 EDT 2009
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv18430/Source
Modified Files:
cmGlobalXCodeGenerator.cxx cmLocalGenerator.cxx
Log Message:
Fix for bug #9466. Change the implementation of OSX arch lists. If no ARCHs are specified by the user then no flags are set. We no longer use CMAKE_OSX_ARCHITECTURES_DEFAULT.
Index: cmGlobalXCodeGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalXCodeGenerator.cxx,v
retrieving revision 1.224
retrieving revision 1.225
diff -C 2 -d -r1.224 -r1.225
*** cmGlobalXCodeGenerator.cxx 14 Sep 2009 19:20:15 -0000 1.224
--- cmGlobalXCodeGenerator.cxx 17 Sep 2009 15:53:02 -0000 1.225
***************
*** 2676,2679 ****
--- 2676,2693 ----
const char* osxArch =
this->CurrentMakefile->GetDefinition("CMAKE_OSX_ARCHITECTURES");
+ if(strlen(osxArch) == 0)
+ {
+ if(this->XcodeVersion >= 32)
+ {
+ osxArch = "$(ARCHS_STANDARD_32_64_BIT)";
+ }
+ else
+ {
+ osxArch = "$(ARCHS_STANDARD_32_BIT)";
+ }
+ buildSettings->AddAttribute("ONLY_ACTIVE_ARCH",
+ this->CreateString("YES"));
+ }
+
const char* sysroot =
this->CurrentMakefile->GetDefinition("CMAKE_OSX_SYSROOT");
***************
*** 2689,2719 ****
cmSystemTools::ExpandListArgument(std::string(osxArch),
this->Architectures);
! bool addArchFlag = true;
! if(this->Architectures.size() == 1)
! {
! const char* archOrig =
! this->
! CurrentMakefile->GetSafeDefinition("CMAKE_OSX_ARCHITECTURES_DEFAULT");
! if(this->Architectures[0] == archOrig)
! {
! addArchFlag = false;
! }
! }
! if(addArchFlag)
{
! flagsUsed = true;
! buildSettings->AddAttribute("SDKROOT",
! this->CreateString(sysroot));
! std::string archString;
! for( std::vector<std::string>::iterator i =
! this->Architectures.begin();
! i != this->Architectures.end(); ++i)
! {
! archString += *i;
! archString += " ";
! }
! buildSettings->AddAttribute("ARCHS",
! this->CreateString(archString.c_str()));
}
if(!flagsUsed && sysrootDefault &&
strcmp(sysroot, sysrootDefault) != 0)
--- 2703,2719 ----
cmSystemTools::ExpandListArgument(std::string(osxArch),
this->Architectures);
! flagsUsed = true;
! buildSettings->AddAttribute("SDKROOT",
! this->CreateString(sysroot));
! std::string archString;
! for( std::vector<std::string>::iterator i =
! this->Architectures.begin();
! i != this->Architectures.end(); ++i)
{
! archString += *i;
! archString += " ";
}
+ buildSettings->AddAttribute("ARCHS",
+ this->CreateString(archString.c_str()));
if(!flagsUsed && sysrootDefault &&
strcmp(sysroot, sysrootDefault) != 0)
Index: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.309
retrieving revision 1.310
diff -C 2 -d -r1.309 -r1.310
*** cmLocalGenerator.cxx 3 Sep 2009 12:27:12 -0000 1.309
--- cmLocalGenerator.cxx 17 Sep 2009 15:53:02 -0000 1.310
***************
*** 1771,1778 ****
if(archs.size() == 1)
{
! const char* archOrig =
! this->Makefile->GetSafeDefinition("CMAKE_OSX_ARCHITECTURES_DEFAULT");
!
! if(archs[0] == archOrig)
{
addArchFlag = false;
--- 1771,1775 ----
if(archs.size() == 1)
{
! if(archs[0] == "")
{
addArchFlag = false;
More information about the Cmake-commits
mailing list