Commit 4965bade authored by Robert Zuber's avatar Robert Zuber Committed by Fabio Pelosin

[Analyzer] support multiple values in ARCHS

Targets defining custom values for the `ARCHS` build setting
require support libs to be built with at least those same settings
to be usable.
parent 91e055e9
...@@ -2,16 +2,16 @@ ...@@ -2,16 +2,16 @@
To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides/installing_cocoapods.html). To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides/installing_cocoapods.html).
## Master ## Master
* Display indication for deprecated pods when searching for pods * Display indication for deprecated pods when searching for Pods.
[Hugo Tunius][k0nserv] [Hugo Tunius][k0nserv]
[#2180](https://github.com/CocoaPods/CocoaPods/issues/2180) [#2180](https://github.com/CocoaPods/CocoaPods/issues/2180)
##### Bug Fixes ##### Bug Fixes
* Fixed pod repo push to first check if Specs directory exists and if so push there. * Fixed pod repo push to first check if Specs directory exists and if so push
there.
[Edward Valentini](edwardvalentini) [Edward Valentini](edwardvalentini)
[#2060](https://github.com/CocoaPods/CocoaPods/issues/2060) [#2060](https://github.com/CocoaPods/CocoaPods/issues/2060)
...@@ -33,11 +33,14 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides ...@@ -33,11 +33,14 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
[Paddy O'Brien](tapi) [Paddy O'Brien](tapi)
[#2181](https://github.com/CocoaPods/CocoaPods/issues/2181) [#2181](https://github.com/CocoaPods/CocoaPods/issues/2181)
* Fixed missing XCTest framework in Xcode 6.
* Fixed missing XCTest framework in Xcode 6
[Paul Williamson](squarefrog) [Paul Williamson](squarefrog)
[#2296](https://github.com/CocoaPods/CocoaPods/issues/2296) [#2296](https://github.com/CocoaPods/CocoaPods/issues/2296)
* Support multiple values in ARCHS.
[Robert Zuber](https://github.com/z00b)
[#1904](https://github.com/CocoaPods/CocoaPods/issues/1904)
## 0.33.1 ## 0.33.1
...@@ -244,12 +247,11 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides ...@@ -244,12 +247,11 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
[Fabio Pelosin][irrationalfab] [Fabio Pelosin][irrationalfab]
[#1021](https://github.com/CocoaPods/CocoaPods/issues/1021) [#1021](https://github.com/CocoaPods/CocoaPods/issues/1021)
* Warn when including deprecated pods * Warn when including deprecated pods
[Samuel E. Giddins](https://github.com/segiddins) [Samuel E. Giddins](https://github.com/segiddins)
[#2003](https://github.com/CocoaPods/CocoaPods/issues/2003) [#2003](https://github.com/CocoaPods/CocoaPods/issues/2003)
## 0.31.1 ## 0.31.1
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.31.1...0.31.0) [CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.31.1...0.31.0)
[CocoaPods-Core](https://github.com/CocoaPods/Core/compare/0.31.1...0.31.0) [CocoaPods-Core](https://github.com/CocoaPods/Core/compare/0.31.1...0.31.0)
......
...@@ -494,12 +494,8 @@ module Pod ...@@ -494,12 +494,8 @@ module Pod
end end
archs = archs.compact.uniq.sort archs = archs.compact.uniq.sort
if archs.count > 1 UI.puts("Using `ARCHS` setting to build architectures: (`#{archs.join('`, `')}`)")
UI.warn "Found multiple values (`#{archs.join('`, `')}`) for the " \ archs.length > 1 ? archs : archs.first
"architectures (`ARCHS`) build setting for the " \
"`#{target_definition}` target definition. Using the first."
end
archs.first
end end
# Precompute the platforms for each target_definition in the Podfile # Precompute the platforms for each target_definition in the Podfile
......
...@@ -364,20 +364,20 @@ module Pod ...@@ -364,20 +364,20 @@ module Pod
it "handles an Array of ARCHs defined in a single user target" do it "handles an Array of ARCHs defined in a single user target" do
user_project = Xcodeproj::Project.new('path') user_project = Xcodeproj::Project.new('path')
target = user_project.new_target(:application, 'Target', :ios) target = user_project.new_target(:application, 'Target', :ios)
target.build_configuration_list.set_setting('ARCHS', 'armv7') target.build_configuration_list.set_setting('ARCHS', ['armv7', 'i386'])
target_definition = Podfile::TargetDefinition.new(:default, nil) target_definition = Podfile::TargetDefinition.new(:default, nil)
target_definition.set_platform(:ios, '4.0') target_definition.set_platform(:ios, '4.0')
user_targets = [target] user_targets = [target]
archs = @analyzer.send(:compute_archs_for_target_definition, target_definition, user_targets) archs = @analyzer.send(:compute_archs_for_target_definition, target_definition, user_targets)
archs.should == 'armv7' ['armv7', 'i386'].each { |a| archs.should.include a }
end end
it "handles an Array of ARCHs defined multiple user targets" do it "handles an Array of ARCHs defined multiple user targets" do
user_project = Xcodeproj::Project.new('path') user_project = Xcodeproj::Project.new('path')
targeta = user_project.new_target(:application, 'Target', :ios) targeta = user_project.new_target(:application, 'Target', :ios)
targeta.build_configuration_list.set_setting('ARCHS', 'armv7') targeta.build_configuration_list.set_setting('ARCHS', ['armv7', 'armv7s'])
targetb = user_project.new_target(:application, 'Target', :ios) targetb = user_project.new_target(:application, 'Target', :ios)
targetb.build_configuration_list.set_setting('ARCHS', ['armv7', 'i386']) targetb.build_configuration_list.set_setting('ARCHS', ['armv7', 'i386'])
...@@ -386,9 +386,8 @@ module Pod ...@@ -386,9 +386,8 @@ module Pod
user_targets = [targeta, targetb] user_targets = [targeta, targetb]
archs = @analyzer.send(:compute_archs_for_target_definition, target_definition, user_targets) archs = @analyzer.send(:compute_archs_for_target_definition, target_definition, user_targets)
archs.should == 'armv7' ['armv7', 'armv7s', 'i386'].each { |a| archs.should.include a }
end end
end end
#--------------------------------------# #--------------------------------------#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment