This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, next has been updated via 7b30a3493ede59756b635fc236bf2038df58dce6 (commit) via b76b52c0b4b2f1cd324d6e93d26911e3bc4a8b87 (commit) via 9e14a5dee2b7ec420fcfea49c2f2f41da84e2cbf (commit) from 102daca0973b2e0980eb6dc5ee6485f4cab31124 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7b30a3493ede59756b635fc236bf2038df58dce6 commit 7b30a3493ede59756b635fc236bf2038df58dce6 Merge: 102daca b76b52c Author: Brad King <brad.k...@kitware.com> AuthorDate: Fri Mar 27 10:58:49 2015 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Fri Mar 27 10:58:49 2015 -0400 Merge topic 'xcode-default-ARCHS' into next b76b52c0 Xcode: Set ARCHS only when CMAKE_OSX_ARCHITECTURES is specified (#14736) 9e14a5de cmGlobalXCodeGenerator: Simplify ARCHS list with cmJoin http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b76b52c0b4b2f1cd324d6e93d26911e3bc4a8b87 commit b76b52c0b4b2f1cd324d6e93d26911e3bc4a8b87 Author: Brad King <brad.k...@kitware.com> AuthorDate: Fri Mar 27 10:46:11 2015 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Fri Mar 27 10:52:32 2015 -0400 Xcode: Set ARCHS only when CMAKE_OSX_ARCHITECTURES is specified (#14736) Teach the Xcode generator that ONLY_ACTIVE_ARCH=YES means to use ARCHS, and that the default of ONLY_ACTIVE_ARCH=NO means to use NATIVE_ARCH and ignore ARCHS. In the latter case there is no reason to generate ARCHS. diff --git a/Modules/CompilerId/Xcode-3.pbxproj.in b/Modules/CompilerId/Xcode-3.pbxproj.in index 7f686a2..20f3da3 100644 --- a/Modules/CompilerId/Xcode-3.pbxproj.in +++ b/Modules/CompilerId/Xcode-3.pbxproj.in @@ -79,7 +79,6 @@ 1DEB928A08733DD80010E9CD = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; ONLY_ACTIVE_ARCH = YES; CODE_SIGNING_REQUIRED = NO; CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)"; diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 447f975..f139ad1 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -3381,44 +3381,33 @@ bool cmGlobalXCodeGenerator this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP); const char* osxArch = this->CurrentMakefile->GetDefinition("CMAKE_OSX_ARCHITECTURES"); - if(!osxArch || strlen(osxArch) == 0) - { - if(this->XcodeVersion >= 32) - { - osxArch = "$(ARCHS_STANDARD_32_64_BIT)"; - } - else if(this->XcodeVersion == 31) - { - osxArch = "$(ARCHS_STANDARD_32_BIT)"; - } - else if(this->XcodeVersion <= 30) - { -#ifdef __ppc__ - osxArch = "ppc"; -#endif -#ifdef __i386 - osxArch = "i386"; -#endif - } - buildSettings->AddAttribute("ONLY_ACTIVE_ARCH", - this->CreateString("YES")); - } - const char* sysroot = this->CurrentMakefile->GetDefinition("CMAKE_OSX_SYSROOT"); const char* deploymentTarget = this->CurrentMakefile->GetDefinition("CMAKE_OSX_DEPLOYMENT_TARGET"); - if(osxArch && sysroot) + std::string archs; + if(sysroot) { - // recompute this as it may have been changed since enable language - this->Architectures.clear(); - cmSystemTools::ExpandListArgument(std::string(osxArch), - this->Architectures); + if(osxArch) + { + // recompute this as it may have been changed since enable language + this->Architectures.clear(); + cmSystemTools::ExpandListArgument(std::string(osxArch), + this->Architectures); + archs = cmJoin(this->Architectures, " "); + } buildSettings->AddAttribute("SDKROOT", this->CreateString(sysroot)); - std::string const& archString = cmJoin(this->Architectures, " "); - buildSettings->AddAttribute("ARCHS", - this->CreateString(archString.c_str())); + } + if (archs.empty()) + { + // Tell Xcode to use NATIVE_ARCH instead of ARCHS. + buildSettings->AddAttribute("ONLY_ACTIVE_ARCH", this->CreateString("YES")); + } + else + { + // Tell Xcode to use ARCHS (ONLY_ACTIVE_ARCH defaults to NO). + buildSettings->AddAttribute("ARCHS", this->CreateString(archs.c_str())); } if(deploymentTarget && *deploymentTarget) { http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9e14a5dee2b7ec420fcfea49c2f2f41da84e2cbf commit 9e14a5dee2b7ec420fcfea49c2f2f41da84e2cbf Author: Brad King <brad.k...@kitware.com> AuthorDate: Fri Mar 27 09:32:53 2015 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Fri Mar 27 09:50:14 2015 -0400 cmGlobalXCodeGenerator: Simplify ARCHS list with cmJoin diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index d340e72..447f975 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -21,6 +21,7 @@ #include "cmCustomCommandGenerator.h" #include "cmGeneratorTarget.h" #include "cmGlobalGeneratorFactory.h" +#include "cmAlgorithms.h" #include <cmsys/auto_ptr.hxx> @@ -3415,16 +3416,7 @@ bool cmGlobalXCodeGenerator this->Architectures); buildSettings->AddAttribute("SDKROOT", this->CreateString(sysroot)); - std::string archString; - const char* sep = ""; - for( std::vector<std::string>::iterator i = - this->Architectures.begin(); - i != this->Architectures.end(); ++i) - { - archString += sep; - archString += *i; - sep = " "; - } + std::string const& archString = cmJoin(this->Architectures, " "); buildSettings->AddAttribute("ARCHS", this->CreateString(archString.c_str())); } ----------------------------------------------------------------------- Summary of changes: Modules/CompilerId/Xcode-3.pbxproj.in | 1 - Source/cmGlobalXCodeGenerator.cxx | 61 ++++++++++++--------------------- 2 files changed, 21 insertions(+), 41 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits