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
42b99dfb
Commit
42b99dfb
authored
May 25, 2017
by
Dimitris Koutsogiorgas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop adding `$(inherited)` for every static library linked
parent
28ad8cd8
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
8 deletions
+12
-8
CHANGELOG.md
CHANGELOG.md
+4
-0
xcconfig_helper.rb
lib/cocoapods/generator/xcconfig/xcconfig_helper.rb
+1
-1
pod_xcconfig_spec.rb
spec/unit/generator/xcconfig/pod_xcconfig_spec.rb
+1
-1
xcconfig_helper_spec.rb
spec/unit/generator/xcconfig/xcconfig_helper_spec.rb
+6
-6
No files found.
CHANGELOG.md
View file @
42b99dfb
...
@@ -34,6 +34,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -34,6 +34,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#5117
](
https://github.com/CocoaPods/CocoaPods/issues/5117
)
[
#5117
](
https://github.com/CocoaPods/CocoaPods/issues/5117
)
*
Stop adding
`$(inherited)`
for every static library linked
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#6756
](
https://github.com/CocoaPods/CocoaPods/pull/6756
)
*
Only check for valid Swift version for pod targets that use Swift
*
Only check for valid Swift version for pod targets that use Swift
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#6733
](
https://github.com/CocoaPods/CocoaPods/pull/6733
)
[
#6733
](
https://github.com/CocoaPods/CocoaPods/pull/6733
)
...
...
lib/cocoapods/generator/xcconfig/xcconfig_helper.rb
View file @
42b99dfb
...
@@ -212,7 +212,7 @@ module Pod
...
@@ -212,7 +212,7 @@ module Pod
name
=
File
.
basename
(
library_path
,
extension
).
sub
(
/\Alib/
,
''
)
name
=
File
.
basename
(
library_path
,
extension
).
sub
(
/\Alib/
,
''
)
dirname
=
'${PODS_ROOT}/'
+
library_path
.
dirname
.
relative_path_from
(
sandbox_root
).
to_s
dirname
=
'${PODS_ROOT}/'
+
library_path
.
dirname
.
relative_path_from
(
sandbox_root
).
to_s
build_settings
=
{
build_settings
=
{
'LIBRARY_SEARCH_PATHS'
=>
'$(inherited) '
+
quote
([
dirname
]),
'LIBRARY_SEARCH_PATHS'
=>
quote
([
dirname
]),
}
}
build_settings
[
'OTHER_LDFLAGS'
]
=
"-l
#{
name
}
"
if
include_other_ldflags
build_settings
[
'OTHER_LDFLAGS'
]
=
"-l
#{
name
}
"
if
include_other_ldflags
xcconfig
.
merge!
(
build_settings
)
xcconfig
.
merge!
(
build_settings
)
...
...
spec/unit/generator/xcconfig/pod_xcconfig_spec.rb
View file @
42b99dfb
...
@@ -159,7 +159,7 @@ module Pod
...
@@ -159,7 +159,7 @@ module Pod
@coconut_pod_target
.
test_dependent_targets
=
[
@banana_pod_target
]
@coconut_pod_target
.
test_dependent_targets
=
[
@banana_pod_target
]
generator
=
PodXCConfig
.
new
(
@coconut_pod_target
,
true
)
generator
=
PodXCConfig
.
new
(
@coconut_pod_target
,
true
)
xcconfig
=
generator
.
generate
xcconfig
=
generator
.
generate
xcconfig
.
to_hash
[
'LIBRARY_SEARCH_PATHS'
].
should
==
'$(inherited) "$PODS_CONFIGURATION_BUILD_DIR/BananaLib"
$(inherited)
"${PODS_ROOT}/../../spec/fixtures/banana-lib"'
xcconfig
.
to_hash
[
'LIBRARY_SEARCH_PATHS'
].
should
==
'$(inherited) "$PODS_CONFIGURATION_BUILD_DIR/BananaLib" "${PODS_ROOT}/../../spec/fixtures/banana-lib"'
end
end
it
'does not include other ld flags for test dependent targets if its not a test xcconfig'
do
it
'does not include other ld flags for test dependent targets if its not a test xcconfig'
do
...
...
spec/unit/generator/xcconfig/xcconfig_helper_spec.rb
View file @
42b99dfb
...
@@ -156,7 +156,7 @@ module Pod
...
@@ -156,7 +156,7 @@ module Pod
@sut
.
add_library_build_settings
(
path
,
xcconfig
,
config
.
sandbox
.
root
)
@sut
.
add_library_build_settings
(
path
,
xcconfig
,
config
.
sandbox
.
root
)
hash_config
=
xcconfig
.
to_hash
hash_config
=
xcconfig
.
to_hash
hash_config
[
'OTHER_LDFLAGS'
].
should
==
'-l"Proj4"'
hash_config
[
'OTHER_LDFLAGS'
].
should
==
'-l"Proj4"'
hash_config
[
'LIBRARY_SEARCH_PATHS'
].
should
==
'
$(inherited)
"${PODS_ROOT}/MapBox/Proj4"'
hash_config
[
'LIBRARY_SEARCH_PATHS'
].
should
==
'"${PODS_ROOT}/MapBox/Proj4"'
end
end
it
'adds dylib build settings to the given xcconfig'
do
it
'adds dylib build settings to the given xcconfig'
do
...
@@ -165,7 +165,7 @@ module Pod
...
@@ -165,7 +165,7 @@ module Pod
@sut
.
add_library_build_settings
(
path
,
xcconfig
,
config
.
sandbox
.
root
)
@sut
.
add_library_build_settings
(
path
,
xcconfig
,
config
.
sandbox
.
root
)
hash_config
=
xcconfig
.
to_hash
hash_config
=
xcconfig
.
to_hash
hash_config
[
'OTHER_LDFLAGS'
].
should
==
'-l"Proj4"'
hash_config
[
'OTHER_LDFLAGS'
].
should
==
'-l"Proj4"'
hash_config
[
'LIBRARY_SEARCH_PATHS'
].
should
==
'
$(inherited)
"${PODS_ROOT}/MapBox/Proj4"'
hash_config
[
'LIBRARY_SEARCH_PATHS'
].
should
==
'"${PODS_ROOT}/MapBox/Proj4"'
end
end
end
end
...
@@ -238,7 +238,7 @@ module Pod
...
@@ -238,7 +238,7 @@ module Pod
pod_target
=
stub
(
:sandbox
=>
config
.
sandbox
)
pod_target
=
stub
(
:sandbox
=>
config
.
sandbox
)
xcconfig
=
Xcodeproj
::
Config
.
new
xcconfig
=
Xcodeproj
::
Config
.
new
@sut
.
add_static_dependency_build_settings
(
aggregate_target
,
pod_target
,
xcconfig
,
@accessor
)
@sut
.
add_static_dependency_build_settings
(
aggregate_target
,
pod_target
,
xcconfig
,
@accessor
)
xcconfig
.
to_hash
[
'LIBRARY_SEARCH_PATHS'
].
should
==
'
$(inherited)
"${PODS_ROOT}/../../spec/fixtures/banana-lib"'
xcconfig
.
to_hash
[
'LIBRARY_SEARCH_PATHS'
].
should
==
'"${PODS_ROOT}/../../spec/fixtures/banana-lib"'
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
].
should
==
'"${PODS_ROOT}/../../spec/fixtures/banana-lib"'
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
].
should
==
'"${PODS_ROOT}/../../spec/fixtures/banana-lib"'
xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
be
.
nil
xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
be
.
nil
end
end
...
@@ -249,7 +249,7 @@ module Pod
...
@@ -249,7 +249,7 @@ module Pod
aggregate_target
=
stub
(
:target_definition
=>
target_definition
,
:pod_targets
=>
[
pod_target
],
:search_paths_aggregate_targets
=>
[])
aggregate_target
=
stub
(
:target_definition
=>
target_definition
,
:pod_targets
=>
[
pod_target
],
:search_paths_aggregate_targets
=>
[])
xcconfig
=
Xcodeproj
::
Config
.
new
xcconfig
=
Xcodeproj
::
Config
.
new
@sut
.
add_static_dependency_build_settings
(
aggregate_target
,
pod_target
,
xcconfig
,
@accessor
)
@sut
.
add_static_dependency_build_settings
(
aggregate_target
,
pod_target
,
xcconfig
,
@accessor
)
xcconfig
.
to_hash
[
'LIBRARY_SEARCH_PATHS'
].
should
==
'
$(inherited)
"${PODS_ROOT}/../../spec/fixtures/banana-lib"'
xcconfig
.
to_hash
[
'LIBRARY_SEARCH_PATHS'
].
should
==
'"${PODS_ROOT}/../../spec/fixtures/banana-lib"'
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
].
should
==
'"${PODS_ROOT}/../../spec/fixtures/banana-lib"'
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
].
should
==
'"${PODS_ROOT}/../../spec/fixtures/banana-lib"'
xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
==
'-l"Bananalib" -framework "Bananalib"'
xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
==
'-l"Bananalib" -framework "Bananalib"'
end
end
...
@@ -260,7 +260,7 @@ module Pod
...
@@ -260,7 +260,7 @@ module Pod
pod_target
=
stub
(
:sandbox
=>
config
.
sandbox
)
pod_target
=
stub
(
:sandbox
=>
config
.
sandbox
)
xcconfig
=
Xcodeproj
::
Config
.
new
xcconfig
=
Xcodeproj
::
Config
.
new
@sut
.
add_static_dependency_build_settings
(
aggregate_target
,
pod_target
,
xcconfig
,
@accessor
)
@sut
.
add_static_dependency_build_settings
(
aggregate_target
,
pod_target
,
xcconfig
,
@accessor
)
xcconfig
.
to_hash
[
'LIBRARY_SEARCH_PATHS'
].
should
==
'
$(inherited)
"${PODS_ROOT}/../../spec/fixtures/banana-lib"'
xcconfig
.
to_hash
[
'LIBRARY_SEARCH_PATHS'
].
should
==
'"${PODS_ROOT}/../../spec/fixtures/banana-lib"'
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
].
should
==
'"${PODS_ROOT}/../../spec/fixtures/banana-lib"'
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
].
should
==
'"${PODS_ROOT}/../../spec/fixtures/banana-lib"'
xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
==
'-l"Bananalib" -framework "Bananalib"'
xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
==
'-l"Bananalib" -framework "Bananalib"'
end
end
...
@@ -269,7 +269,7 @@ module Pod
...
@@ -269,7 +269,7 @@ module Pod
pod_target
=
stub
(
:sandbox
=>
config
.
sandbox
)
pod_target
=
stub
(
:sandbox
=>
config
.
sandbox
)
xcconfig
=
Xcodeproj
::
Config
.
new
xcconfig
=
Xcodeproj
::
Config
.
new
@sut
.
add_static_dependency_build_settings
(
nil
,
pod_target
,
xcconfig
,
@accessor
)
@sut
.
add_static_dependency_build_settings
(
nil
,
pod_target
,
xcconfig
,
@accessor
)
xcconfig
.
to_hash
[
'LIBRARY_SEARCH_PATHS'
].
should
==
'
$(inherited)
"${PODS_ROOT}/../../spec/fixtures/banana-lib"'
xcconfig
.
to_hash
[
'LIBRARY_SEARCH_PATHS'
].
should
==
'"${PODS_ROOT}/../../spec/fixtures/banana-lib"'
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
].
should
==
'"${PODS_ROOT}/../../spec/fixtures/banana-lib"'
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
].
should
==
'"${PODS_ROOT}/../../spec/fixtures/banana-lib"'
xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
==
'-l"Bananalib" -framework "Bananalib"'
xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
==
'-l"Bananalib" -framework "Bananalib"'
end
end
...
...
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