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
70036af6
Commit
70036af6
authored
Apr 19, 2018
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AggregateTargetSettings] Include OTHER_SWIFT_FLAGS even when there are no swift pods
parent
5e7cb988
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
2 deletions
+22
-2
build_settings.rb
lib/cocoapods/target/build_settings.rb
+14
-1
cocoapods-integration-specs
spec/cocoapods-integration-specs
+1
-1
aggregate_target_settings_spec.rb
...t/target/build_settings/aggregate_target_settings_spec.rb
+7
-0
No files found.
lib/cocoapods/target/build_settings.rb
View file @
70036af6
...
@@ -277,9 +277,17 @@ module Pod
...
@@ -277,9 +277,17 @@ module Pod
# @!group Swift
# @!group Swift
# @return [Boolean]
# Whether `OTHER_SWIFT_FLAGS` should be generated when the target
# does not use swift.
#
def
other_swift_flags_without_swift?
false
end
# @return [Array<String>]
# @return [Array<String>]
define_build_settings_method
:other_swift_flags
,
:build_setting
=>
true
,
:memoized
=>
true
do
define_build_settings_method
:other_swift_flags
,
:build_setting
=>
true
,
:memoized
=>
true
do
return
unless
target
.
uses_swift?
return
unless
target
.
uses_swift?
||
other_swift_flags_without_swift?
flags
=
%w(-D COCOAPODS)
flags
=
%w(-D COCOAPODS)
flags
.
concat
module_map_files
.
flat_map
{
|
f
|
[
'-Xcc'
,
"-fmodule-map-file=
#{
f
}
"
]
}
flags
.
concat
module_map_files
.
flat_map
{
|
f
|
[
'-Xcc'
,
"-fmodule-map-file=
#{
f
}
"
]
}
flags
flags
...
@@ -931,6 +939,11 @@ module Pod
...
@@ -931,6 +939,11 @@ module Pod
# @!group Swift
# @!group Swift
# @see BuildSettings#other_swift_flags_without_swift?
def
other_swift_flags_without_swift?
module_map_files
.
any?
end
# @return [Array<String>]
# @return [Array<String>]
define_build_settings_method
:swift_include_paths
,
:build_setting
=>
true
,
:memoized
=>
true
,
:sorted
=>
true
,
:uniqued
=>
true
,
:from_pod_targets_to_link
=>
true
,
:from_search_paths_aggregate_targets
=>
:swift_include_paths_to_import
do
define_build_settings_method
:swift_include_paths
,
:build_setting
=>
true
,
:memoized
=>
true
,
:sorted
=>
true
,
:uniqued
=>
true
,
:from_pod_targets_to_link
=>
true
,
:from_search_paths_aggregate_targets
=>
:swift_include_paths_to_import
do
[]
[]
...
...
cocoapods-integration-specs
@
2faa5dd5
Subproject commit
6d513c5e91d77b79384bde41f760eef2482e3357
Subproject commit
2faa5dd550afc3158b119ebc1fe90eea5fa15825
spec/unit/target/build_settings/aggregate_target_settings_spec.rb
View file @
70036af6
...
@@ -158,6 +158,13 @@ module Pod
...
@@ -158,6 +158,13 @@ module Pod
@xcconfig
.
to_hash
[
'OTHER_CFLAGS'
].
should
==
expected
@xcconfig
.
to_hash
[
'OTHER_CFLAGS'
].
should
==
expected
end
end
it
'adds the dependent pods module map file to OTHER_SWIFT_FLAGS'
do
@pod_targets
.
each
{
|
pt
|
pt
.
stubs
(
:defines_module?
=>
true
)
}
@xcconfig
=
@generator
.
generate
expected
=
'$(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Private/BananaLib/BananaLib.modulemap"'
@xcconfig
.
to_hash
[
'OTHER_SWIFT_FLAGS'
].
should
==
expected
end
describe
'with a scoped pod target'
do
describe
'with a scoped pod target'
do
def
pod_target
(
spec
,
target_definition
)
def
pod_target
(
spec
,
target_definition
)
fixture_pod_target
(
spec
,
false
,
{},
[],
Platform
.
new
(
:ios
,
'6.0'
),
[
target_definition
]).
scoped
.
first
fixture_pod_target
(
spec
,
false
,
{},
[],
Platform
.
new
(
:ios
,
'6.0'
),
[
target_definition
]).
scoped
.
first
...
...
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