Commit 4e6646a7 authored by Marin Usalj's avatar Marin Usalj

merged inhibit_all_warnings with inhibits_warnings_per_pod?

parent 023e22d4
...@@ -72,9 +72,6 @@ module Pod ...@@ -72,9 +72,6 @@ module Pod
if library.platform.requires_legacy_ios_archs? if library.platform.requires_legacy_ios_archs?
settings['ARCHS'] = "armv6 armv7" settings['ARCHS'] = "armv6 armv7"
end end
if target_definition.inhibit_all_warnings?
settings['GCC_WARN_INHIBIT_ALL_WARNINGS'] = 'YES'
end
@target.build_settings('Debug').merge!(settings) @target.build_settings('Debug').merge!(settings)
@target.build_settings('Release').merge!(settings) @target.build_settings('Release').merge!(settings)
...@@ -363,7 +360,7 @@ module Pod ...@@ -363,7 +360,7 @@ module Pod
end end
end end
if target_definition.inhibits_warnings_for_pod?(consumer.spec.root.name) if target_definition.inhibits_warnings_for_pod?(consumer.spec.root.name)
flags << '-w' flags << '-w -Xanalyzer -analyzer-disable-checker'
end end
flags * " " flags * " "
end end
......
...@@ -123,14 +123,6 @@ module Pod ...@@ -123,14 +123,6 @@ module Pod
end end
end end
it "enables the GCC_WARN_INHIBIT_ALL_WARNINGS flag" do
@podfile.inhibit_all_warnings!
@installer.install!
@installer.library.target.build_configurations.each do |config|
config.build_settings['GCC_WARN_INHIBIT_ALL_WARNINGS'].should == 'YES'
end
end
#--------------------------------------# #--------------------------------------#
it 'adds the source files of each pod to the target of the Pod library' do it 'adds the source files of each pod to the target of the Pod library' do
...@@ -266,6 +258,19 @@ module Pod ...@@ -266,6 +258,19 @@ module Pod
flags = @installer.send(:compiler_flags_for_consumer, @spec.consumer(:ios)) flags = @installer.send(:compiler_flags_for_consumer, @spec.consumer(:ios))
flags.should.not.include?('-w') flags.should.not.include?('-w')
end end
it "adds -Xanalyzer -analyzer-disable-checker per pod" do
@installer.library.target_definition.stubs(:inhibits_warnings_for_pod?).returns(true)
flags = @installer.send(:compiler_flags_for_consumer, @spec.consumer(:ios))
flags.should.include?('-Xanalyzer -analyzer-disable-checker')
end
it "doesn't inhibit analyzer warnings by default" do
flags = @installer.send(:compiler_flags_for_consumer, @spec.consumer(:ios))
flags.should.not.include?('-Xanalyzer -analyzer-disable-checker')
end
end end
end end
end 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