Commit 02d2bb9f authored by swizzlr's avatar swizzlr

Merge pull request #1596 from swizzlr/system_header_warning_inhibition

Inhibit warnings by adding search paths as system headers.
parents 9e71add2 48891df9
......@@ -19,4 +19,4 @@
url = https://github.com/tonymillion/Reachability.git
[submodule "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
......@@ -44,11 +44,13 @@ module Pod
# @return [Xcodeproj::Config]
#
def generate
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' => '$(inherited) ' + XCConfigHelper.quote(header_search_path_flags)
})
target.pod_targets.each do |pod_target|
......
......@@ -55,11 +55,16 @@ 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
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('" "')}\""
@xcconfig.to_hash['HEADER_SEARCH_PATHS'].should == expected
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
@xcconfig.to_hash['GCC_PREPROCESSOR_DEFINITIONS'].should.include 'COCOAPODS=1'
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment