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
507e17b0
Unverified
Commit
507e17b0
authored
Nov 30, 2017
by
Dimitris Koutsogiorgas
Committed by
GitHub
Nov 30, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7247 from AquaGeek/quote-frameworks-in-other-ldflags
[XCConfigHelper] Quote framework names in OTHER_LDFLAGS
parents
3fe4b32a
91b1699f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
4 deletions
+20
-4
CHANGELOG.md
CHANGELOG.md
+4
-0
xcconfig_helper.rb
lib/cocoapods/generator/xcconfig/xcconfig_helper.rb
+2
-2
xcconfig_helper_spec.rb
spec/unit/generator/xcconfig/xcconfig_helper_spec.rb
+14
-2
No files found.
CHANGELOG.md
View file @
507e17b0
...
@@ -18,6 +18,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -18,6 +18,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes
##### Bug Fixes
*
Quote framework names in OTHER_LDFLAGS
[
Tyler Stromberg
](
https://github.com/AquaGeek
)
[
#7185
](
https://github.com/CocoaPods/CocoaPods/issues/7185
)
*
Fix static framework archive regression from #7187
*
Fix static framework archive regression from #7187
[
Paul Beusterien
](
https://github.com/paulb777
)
[
Paul Beusterien
](
https://github.com/paulb777
)
[
#7225
](
https://github.com/CocoaPods/CocoaPods/issues/7225
)
[
#7225
](
https://github.com/CocoaPods/CocoaPods/issues/7225
)
...
...
lib/cocoapods/generator/xcconfig/xcconfig_helper.rb
View file @
507e17b0
...
@@ -219,7 +219,7 @@ module Pod
...
@@ -219,7 +219,7 @@ module Pod
build_settings
=
{
build_settings
=
{
'FRAMEWORK_SEARCH_PATHS'
=>
quote
([
dirname
]),
'FRAMEWORK_SEARCH_PATHS'
=>
quote
([
dirname
]),
}
}
build_settings
[
'OTHER_LDFLAGS'
]
=
"-framework
#{
name
}
"
if
include_ld_flags
build_settings
[
'OTHER_LDFLAGS'
]
=
"-framework
\"
#{
name
}
\"
"
if
include_ld_flags
xcconfig
.
merge!
(
build_settings
)
xcconfig
.
merge!
(
build_settings
)
end
end
...
@@ -247,7 +247,7 @@ module Pod
...
@@ -247,7 +247,7 @@ module Pod
build_settings
=
{
build_settings
=
{
'LIBRARY_SEARCH_PATHS'
=>
quote
([
dirname
]),
'LIBRARY_SEARCH_PATHS'
=>
quote
([
dirname
]),
}
}
build_settings
[
'OTHER_LDFLAGS'
]
=
"-l
#{
name
}
"
if
include_ld_flags
build_settings
[
'OTHER_LDFLAGS'
]
=
"-l
\"
#{
name
}
\"
"
if
include_ld_flags
xcconfig
.
merge!
(
build_settings
)
xcconfig
.
merge!
(
build_settings
)
end
end
...
...
spec/unit/generator/xcconfig/xcconfig_helper_spec.rb
View file @
507e17b0
...
@@ -119,7 +119,7 @@ module Pod
...
@@ -119,7 +119,7 @@ module Pod
xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
==
'-l"xml2"'
xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
==
'-l"xml2"'
end
end
it
'checks OTHER_LD
_
FLAGS and FRAMEWORK_SEARCH_PATHS for a vendored dependencies to a static framework'
do
it
'checks OTHER_LDFLAGS and FRAMEWORK_SEARCH_PATHS for a vendored dependencies to a static framework'
do
spec
=
stub
(
:test_specification?
=>
false
)
spec
=
stub
(
:test_specification?
=>
false
)
target_definition
=
stub
(
:inheritance
=>
'search_paths'
)
target_definition
=
stub
(
:inheritance
=>
'search_paths'
)
consumer
=
stub
(
consumer
=
stub
(
...
@@ -159,7 +159,19 @@ module Pod
...
@@ -159,7 +159,19 @@ module Pod
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
].
should
==
'"${PODS_ROOT}/."'
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
].
should
==
'"${PODS_ROOT}/."'
end
end
it
'check that include_ld_flags being false doesnt generate OTHER_LD_FLAGS'
do
it
'quotes OTHER_LDFLAGS to properly handle spaces'
do
framework_path
=
config
.
sandbox
.
root
+
'Sample/Framework with Spaces.framework'
library_path
=
config
.
sandbox
.
root
+
'Sample/libSample Lib.a'
xcconfig
=
Xcodeproj
::
Config
.
new
@sut
.
add_framework_build_settings
(
framework_path
,
xcconfig
,
config
.
sandbox
.
root
)
@sut
.
add_library_build_settings
(
library_path
,
xcconfig
,
config
.
sandbox
.
root
)
hash_config
=
xcconfig
.
to_hash
hash_config
[
'OTHER_LDFLAGS'
].
should
==
'-l"Sample Lib" -framework "Framework with Spaces"'
end
it
'check that include_ld_flags being false doesnt generate OTHER_LDFLAGS'
do
spec
=
stub
(
:test_specification?
=>
false
)
spec
=
stub
(
:test_specification?
=>
false
)
target_definition
=
stub
(
:inheritance
=>
'search_paths'
)
target_definition
=
stub
(
:inheritance
=>
'search_paths'
)
consumer
=
stub
(
consumer
=
stub
(
...
...
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