Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
0d918ae8
Commit
0d918ae8
authored
Jun 16, 2015
by
Marius Rackwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Installer] Fix architecture determination
parent
ac87bcf3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
11 deletions
+11
-11
analyzer.rb
lib/cocoapods/installer/analyzer.rb
+5
-2
target_inspector.rb
lib/cocoapods/installer/analyzer/target_inspector.rb
+1
-6
target_installer.rb
lib/cocoapods/installer/target_installer.rb
+1
-1
target_inspector_spec.rb
spec/unit/installer/analyzer/target_inspector_spec.rb
+2
-2
analyzer_spec.rb
spec/unit/installer/analyzer_spec.rb
+2
-0
No files found.
lib/cocoapods/installer/analyzer.rb
View file @
0d918ae8
...
...
@@ -369,7 +369,7 @@ module Pod
if
config
.
integrate_targets?
target_inspections
=
result
.
target_inspections
.
select
{
|
t
,
_
|
target_definitions
.
include?
(
t
)
}.
values
pod_target
.
user_build_configurations
=
target_inspections
.
map
(
&
:build_configurations
).
reduce
({},
&
:merge
)
pod_target
.
archs
=
target_inspections
.
map
(
&
:archs
)
.
uniq
.
sort
pod_target
.
archs
=
target_inspections
.
flat_map
(
&
:archs
).
compact
.
uniq
.
sort
else
pod_target
.
user_build_configurations
=
{}
if
target_definitions
.
first
.
platform
.
name
==
:osx
...
...
@@ -651,7 +651,10 @@ module Pod
inspection_result
=
{}
UI
.
section
'Inspecting targets to integrate'
do
podfile
.
target_definition_list
.
each
do
|
target_definition
|
inspection_result
[
target_definition
]
=
TargetInspector
.
new
(
target_definition
).
inspect!
results
=
TargetInspector
.
new
(
target_definition
).
inspect!
inspection_result
[
target_definition
]
=
results
UI
.
message
(
'Using `ARCHS` setting to build architectures of '
\
"target `
#{
target_definition
.
label
}
`: (`
#{
results
.
archs
.
join
(
'`, `'
)
}
`)"
)
end
end
inspection_result
...
...
lib/cocoapods/installer/analyzer/target_inspector.rb
View file @
0d918ae8
...
...
@@ -155,14 +155,9 @@ module Pod
# @return [Array<String>]
#
def
compute_archs
(
user_targets
)
archs
=
user_targets
.
flat_map
do
|
target
|
user_targets
.
flat_map
do
|
target
|
Array
(
target
.
common_resolved_build_setting
(
'ARCHS'
))
end
.
compact
.
uniq
.
sort
UI
.
message
(
'Using `ARCHS` setting to build architectures of '
\
"target `
#{
target_definition
.
label
}
`: "
\
"(`
#{
archs
.
join
(
'`, `'
)
}
`)"
)
archs
.
length
>
1
?
archs
:
archs
.
first
end
# Checks if any of the targets for the {TargetDefinition} computed before
...
...
lib/cocoapods/installer/target_installer.rb
View file @
0d918ae8
...
...
@@ -67,7 +67,7 @@ module Pod
def
custom_build_settings
settings
=
{}
if
target
.
archs
unless
target
.
nil?
||
target
.
archs
.
empty?
settings
[
'ARCHS'
]
=
target
.
archs
end
...
...
spec/unit/installer/analyzer/target_inspector_spec.rb
View file @
0d918ae8
...
...
@@ -152,7 +152,7 @@ module Pod
user_targets
=
[
target
]
archs
=
TargetInspector
.
new
(
target_definition
).
send
(
:compute_archs
,
user_targets
)
archs
.
should
==
'armv7'
archs
.
should
==
%w(armv7)
end
it
'handles a single ARCH defined in multiple user targets'
do
...
...
@@ -167,7 +167,7 @@ module Pod
user_targets
=
[
targeta
,
targetb
]
archs
=
TargetInspector
.
new
(
target_definition
).
send
(
:compute_archs
,
user_targets
)
archs
.
should
==
'armv7'
archs
.
should
==
%w(armv7)
end
it
'handles an Array of ARCHs defined in a single user target'
do
...
...
spec/unit/installer/analyzer_spec.rb
View file @
0d918ae8
...
...
@@ -100,6 +100,8 @@ module Pod
].
sort
target
.
support_files_dir
.
should
==
config
.
sandbox
.
target_support_files_dir
(
'Pods'
)
target
.
pod_targets
.
map
(
&
:archs
).
uniq
.
should
==
[[]]
target
.
user_project_path
.
to_s
.
should
.
include
'SampleProject/SampleProject'
target
.
client_root
.
to_s
.
should
.
include
'SampleProject'
target
.
user_target_uuids
.
should
==
[
'A346496C14F9BE9A0080D870'
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment