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
02d2bb9f
Commit
02d2bb9f
authored
Nov 18, 2013
by
swizzlr
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1596 from swizzlr/system_header_warning_inhibition
Inhibit warnings by adding search paths as system headers.
parents
9e71add2
48891df9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
.gitmodules
.gitmodules
+1
-1
aggregate_xcconfig.rb
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
+2
-0
aggregate_xcconfig_spec.rb
spec/unit/generator/xcconfig/aggregate_xcconfig_spec.rb
+6
-1
No files found.
.gitmodules
View file @
02d2bb9f
...
@@ -19,4 +19,4 @@
...
@@ -19,4 +19,4 @@
url = https://github.com/tonymillion/Reachability.git
url = https://github.com/tonymillion/Reachability.git
[submodule "spec/cocoapods-integration-specs"]
[submodule "spec/cocoapods-integration-specs"]
path = spec/cocoapods-integration-specs
path = spec/cocoapods-integration-specs
url = https://github.com/CocoaPods/cocoapods-integration-specs
url = https://github.com/CocoaPods/cocoapods-integration-specs
.git
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
View file @
02d2bb9f
...
@@ -44,11 +44,13 @@ module Pod
...
@@ -44,11 +44,13 @@ module Pod
# @return [Xcodeproj::Config]
# @return [Xcodeproj::Config]
#
#
def
generate
def
generate
header_search_path_flags
=
target
.
sandbox
.
public_headers
.
search_paths
.
map
{
|
path
|
'-isystem'
+
path
}
@xcconfig
=
Xcodeproj
::
Config
.
new
({
@xcconfig
=
Xcodeproj
::
Config
.
new
({
'OTHER_LDFLAGS'
=>
XCConfigHelper
.
default_ld_flags
(
target
),
'OTHER_LDFLAGS'
=>
XCConfigHelper
.
default_ld_flags
(
target
),
'HEADER_SEARCH_PATHS'
=>
XCConfigHelper
.
quote
(
target
.
sandbox
.
public_headers
.
search_paths
),
'HEADER_SEARCH_PATHS'
=>
XCConfigHelper
.
quote
(
target
.
sandbox
.
public_headers
.
search_paths
),
'PODS_ROOT'
=>
target
.
relative_pods_root
,
'PODS_ROOT'
=>
target
.
relative_pods_root
,
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'$(inherited) COCOAPODS=1'
,
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'$(inherited) COCOAPODS=1'
,
'OTHER_CFLAGS'
=>
'$(inherited) '
+
XCConfigHelper
.
quote
(
header_search_path_flags
)
})
})
target
.
pod_targets
.
each
do
|
pod_target
|
target
.
pod_targets
.
each
do
|
pod_target
|
...
...
spec/unit/generator/xcconfig/aggregate_xcconfig_spec.rb
View file @
02d2bb9f
...
@@ -55,11 +55,16 @@ module Pod
...
@@ -55,11 +55,16 @@ module Pod
@xcconfig
.
to_hash
[
'PODS_ROOT'
].
should
==
'${SRCROOT}/Pods'
@xcconfig
.
to_hash
[
'PODS_ROOT'
].
should
==
'${SRCROOT}/Pods'
end
end
it
'adds the sandbox public headers search paths to the xcconfig, with quotes'
do
it
'adds the sandbox public headers search paths to the xcconfig, with quotes
, as header search paths
'
do
expected
=
"
\"
#{
config
.
sandbox
.
public_headers
.
search_paths
.
join
(
'" "'
)
}
\"
"
expected
=
"
\"
#{
config
.
sandbox
.
public_headers
.
search_paths
.
join
(
'" "'
)
}
\"
"
@xcconfig
.
to_hash
[
'HEADER_SEARCH_PATHS'
].
should
==
expected
@xcconfig
.
to_hash
[
'HEADER_SEARCH_PATHS'
].
should
==
expected
end
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"'
)
}
\"
"
@xcconfig
.
to_hash
[
'OTHER_CFLAGS'
].
should
==
expected
end
it
'adds the COCOAPODS macro definition'
do
it
'adds the COCOAPODS macro definition'
do
@xcconfig
.
to_hash
[
'GCC_PREPROCESSOR_DEFINITIONS'
].
should
.
include
'COCOAPODS=1'
@xcconfig
.
to_hash
[
'GCC_PREPROCESSOR_DEFINITIONS'
].
should
.
include
'COCOAPODS=1'
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