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
d8c67f24
Commit
d8c67f24
authored
Feb 04, 2014
by
Eloy Durán
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[xcconfig] Only quote the path to the -isystem option.
parent
76432759
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
5 deletions
+13
-5
aggregate_xcconfig.rb
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
+2
-2
xcconfig_helper.rb
lib/cocoapods/generator/xcconfig/xcconfig_helper.rb
+5
-2
aggregate_xcconfig_spec.rb
spec/unit/generator/xcconfig/aggregate_xcconfig_spec.rb
+1
-1
xcconfig_helper_spec.rb
spec/unit/generator/xcconfig/xcconfig_helper_spec.rb
+5
-0
No files found.
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
View file @
d8c67f24
...
...
@@ -46,13 +46,13 @@ module Pod
# @return [Xcodeproj::Config]
#
def
generate
header_search_path_flags
=
target
.
sandbox
.
public_headers
.
search_paths
.
map
{
|
path
|
"-isystem
#{
path
}
"
}
header_search_path_flags
=
target
.
sandbox
.
public_headers
.
search_paths
@xcconfig
=
Xcodeproj
::
Config
.
new
({
'OTHER_LDFLAGS'
=>
XCConfigHelper
.
default_ld_flags
(
target
),
'HEADER_SEARCH_PATHS'
=>
XCConfigHelper
.
quote
(
target
.
sandbox
.
public_headers
.
search_paths
),
'PODS_ROOT'
=>
target
.
relative_pods_root
,
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'$(inherited) COCOAPODS=1'
,
'OTHER_CFLAGS'
=>
'$(inherited) '
+
XCConfigHelper
.
quote
(
header_search_path_flags
)
'OTHER_CFLAGS'
=>
'$(inherited) '
+
XCConfigHelper
.
quote
(
header_search_path_flags
,
'-isystem'
)
})
target
.
pod_targets
.
each
do
|
pod_target
|
...
...
lib/cocoapods/generator/xcconfig/xcconfig_helper.rb
View file @
d8c67f24
...
...
@@ -13,10 +13,13 @@ module Pod
# @param [Array<String>] strings
# a list of strings.
#
# @param [String] optional prefix, such as a flag or option.
#
# @return [String] the resulting string.
#
def
self
.
quote
(
strings
)
strings
.
sort
.
map
{
|
s
|
%W|"
#{
s
}
"|
}.
join
(
" "
)
def
self
.
quote
(
strings
,
prefix
=
nil
)
prefix
=
"
#{
prefix
}
"
if
prefix
strings
.
sort
.
map
{
|
s
|
%W|
#{
prefix
}
"
#{
s
}
"|
}.
join
(
" "
)
end
# @return [String] the default linker flags. `-ObjC` is always included
...
...
spec/unit/generator/xcconfig/aggregate_xcconfig_spec.rb
View file @
d8c67f24
...
...
@@ -62,7 +62,7 @@ module Pod
end
it
'adds the sandbox public headers search paths to the xcconfig, with quotes, as system headers'
do
expected
=
"$(inherited)
\"
-isystem
#{
config
.
sandbox
.
public_headers
.
search_paths
.
join
(
'" -isystem "'
)
}
\"
"
expected
=
"$(inherited)
-isystem
\"
#{
config
.
sandbox
.
public_headers
.
search_paths
.
join
(
'" -isystem "'
)
}
\"
"
@xcconfig
.
to_hash
[
'OTHER_CFLAGS'
].
should
==
expected
end
...
...
spec/unit/generator/xcconfig/xcconfig_helper_spec.rb
View file @
d8c67f24
...
...
@@ -37,6 +37,11 @@ module Pod
result
=
@sut
.
quote
([
'string1'
,
'string2'
])
result
.
should
==
'"string1" "string2"'
end
it
"inserts an optional string and then the normal quoted string"
do
result
=
@sut
.
quote
([
'string1'
,
'string2'
],
'-isystem'
)
result
.
should
==
'-isystem "string1" -isystem "string2"'
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