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
3b34ad8e
Commit
3b34ad8e
authored
Apr 10, 2018
by
Paul Beusterien
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix static framework dependent target double linking without use_frameworks
parent
045bfff8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
1 deletion
+49
-1
CHANGELOG.md
CHANGELOG.md
+4
-0
xcconfig_helper.rb
lib/cocoapods/generator/xcconfig/xcconfig_helper.rb
+1
-1
xcconfig_helper_spec.rb
spec/unit/generator/xcconfig/xcconfig_helper_spec.rb
+44
-0
No files found.
CHANGELOG.md
View file @
3b34ad8e
...
...
@@ -17,6 +17,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
Paul Beusterien
](
https://github.com/paulb777
)
[
#7597
](
https://github.com/CocoaPods/CocoaPods/issues/7597
)
*
Fix static framework dependent target double linking without use_frameworks
[
Paul Beusterien
](
https://github.com/paulb777
)
[
#7592
](
https://github.com/CocoaPods/CocoaPods/issues/7592
)
*
Inhibit warnings for all dependencies during validation except for the one being validated
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#7434
](
https://github.com/CocoaPods/CocoaPods/issues/7434
)
...
...
lib/cocoapods/generator/xcconfig/xcconfig_helper.rb
View file @
3b34ad8e
...
...
@@ -489,7 +489,7 @@ module Pod
unless
aggregate_target
.
nil?
dependent_targets
=
aggregate_target
.
search_paths_aggregate_targets
dependent_targets
.
each
do
|
dependent_target
|
if
dependent_target
.
pod_targets
.
any?
(
&
:static_framework?
)
if
aggregate_target
.
requires_frameworks?
&&
dependent_target
.
pod_targets
.
any?
(
&
:static_framework?
)
generate_other_ld_flags
(
dependent_target
,
dependent_target
.
pod_targets
,
xcconfig
)
end
end
...
...
spec/unit/generator/xcconfig/xcconfig_helper_spec.rb
View file @
3b34ad8e
...
...
@@ -250,12 +250,56 @@ module Pod
:target_definition
=>
target_definition
,
:pod_targets
=>
[],
:search_paths_aggregate_targets
=>
[
aggregate_target
],
:requires_frameworks?
=>
true
,
)
xcconfig
=
Xcodeproj
::
Config
.
new
@sut
.
generate_other_ld_flags
(
test_aggregate_target
,
[],
xcconfig
)
xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
==
'-framework "Foo"'
end
it
'makes sure setting from search_paths dont propagate for static frameworks when static linking'
do
target_definition
=
stub
(
'target_definition'
,
:inheritance
=>
'search_paths'
)
consumer
=
stub
(
'consumer'
,
:pod_target_xcconfig
=>
{},
:libraries
=>
[
'xml2'
],
:frameworks
=>
[
'Foo'
],
:weak_frameworks
=>
[],
:platform_name
=>
:ios
,
)
file_accessor
=
stub
(
'file_accessor'
,
:spec_consumer
=>
consumer
,
:vendored_static_frameworks
=>
[],
:vendored_dynamic_frameworks
=>
[],
:vendored_static_libraries
=>
[],
:vendored_dynamic_libraries
=>
[],
)
pod_target
=
stub
(
'pod_target'
,
:name
=>
'BananaLib'
,
:sandbox
=>
config
.
sandbox
,
:should_build?
=>
true
,
:requires_frameworks?
=>
false
,
:static_framework?
=>
true
,
:dependent_targets
=>
[],
:file_accessors
=>
[
file_accessor
],
:product_basename
=>
'Foo'
,
)
pod_targets
=
[
pod_target
]
aggregate_target
=
stub
(
'aggregate_target'
,
:target_definition
=>
target_definition
,
:pod_targets
=>
pod_targets
,
:search_paths_aggregate_targets
=>
[],
)
test_aggregate_target
=
stub
(
'test_aggregate_target'
,
:target_definition
=>
target_definition
,
:pod_targets
=>
[],
:search_paths_aggregate_targets
=>
[
aggregate_target
],
:requires_frameworks?
=>
false
,
)
xcconfig
=
Xcodeproj
::
Config
.
new
@sut
.
generate_other_ld_flags
(
test_aggregate_target
,
[],
xcconfig
)
xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
be
.
nil
end
it
'includes HEADER_SEARCH_PATHS from search paths'
do
xcconfig
=
Xcodeproj
::
Config
.
new
spec_consumer
=
stub
(
'spec_consumer'
,
:user_target_xcconfig
=>
{
'HEADER_SEARCH_PATHS'
=>
'my/path'
})
...
...
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