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
3fa2c3bb
Commit
3fa2c3bb
authored
Nov 15, 2013
by
Swizzlr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tests with new behaviour and make it pass
parent
11d5ac1a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
10 deletions
+7
-10
aggregate_xcconfig.rb
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
+2
-3
aggregate_xcconfig_spec.rb
spec/unit/generator/xcconfig/aggregate_xcconfig_spec.rb
+5
-7
No files found.
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
View file @
3fa2c3bb
...
...
@@ -44,13 +44,12 @@ module Pod
# @return [Xcodeproj::Config]
#
def
generate
header_search_paths
=
target
.
sandbox
.
public_headers
.
search_paths
warning_suppressed_paths
=
target
.
pod_targets
.
each
header_search_path_flags
=
target
.
sandbox
.
public_headers
.
search_paths
.
map
{
|
path
|
'-isystem'
+
path
}
@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'
=>
XCConfigHelper
.
quote
(
header_search_path_flags
)
})
target
.
pod_targets
.
each
do
|
pod_target
|
...
...
spec/unit/generator/xcconfig/aggregate_xcconfig_spec.rb
View file @
3fa2c3bb
...
...
@@ -55,15 +55,13 @@ module Pod
@xcconfig
.
to_hash
[
'PODS_ROOT'
].
should
==
'${SRCROOT}/Pods'
end
it
'adds the sandbox public headers search paths to the xcconfig, with quotes'
do
expected
=
"
\"
#{
config
.
sandbox
.
public_headers
.
search_paths
.
join
(
'" "'
)
}
\"
"
@xcconfig
.
to_hash
[
'HEADER_SEARCH_PATHS'
].
should
==
expected
end
#
it 'adds the sandbox public headers search paths to the xcconfig, with quotes' do
#
expected = "\"#{config.sandbox.public_headers.search_paths.join('" "')}\""
#
@xcconfig.to_hash['HEADER_SEARCH_PATHS'].should == expected
#
end
it
'
sets search path as system header given pod warning inhibition
'
do
it
'
adds the sandbox public headers search paths to the xcconfig, with quotes, as system headers
'
do
expected
=
"
\"
-isystem
#{
config
.
sandbox
.
public_headers
.
search_paths
.
join
(
'" -isystem"'
)
}
\"
"
@target
.
target_definition
.
stubs
(
:inhibits_warnings_for_pod?
).
returns
(
true
)
@xcconfig
=
@generator
.
generate
@xcconfig
.
to_hash
[
'OTHER_CFLAGS'
].
should
==
expected
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