Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

added inhibit warnings per pod. fixes #674 #934

Merged
merged 4 commits into from

2 participants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
7 CHANGELOG.md
@@ -15,6 +15,13 @@
has been renamed to `--no-repo-update`.
[#913](https://github.com/CocoaPods/CocoaPods/issues/913)
+###### Enhancements
+
+* Added the ability to inhibit warnings per pod.
+ Just pass `:inhibit_warnings => true` inline.
+ [#10](https://github.com/CocoaPods/Core/pull/10)
+ [#934](https://github.com/CocoaPods/CocoaPods/pull/934)
+
###### Bug fixes
* Improved handling for Xcode projects containing non ASCII characters.
View
5 lib/cocoapods/installer/target_installer.rb
@@ -362,7 +362,10 @@ def compiler_flags_for_consumer(consumer)
flags << '-DOS_OBJECT_USE_OBJC=0'
end
end
- flags = flags * " "
+ if target_definition.inhibits_warnings_for_pod?(consumer.spec.root.name)
+ flags << '-w'
+ end
+ flags * " "
end
#-----------------------------------------------------------------------#
View
12 spec/unit/installer/target_installer_spec.rb
@@ -254,6 +254,18 @@ module Pod
ios_flags.should.include '-DOS_OBJECT_USE_OBJC'
osx_flags.should.include '-DOS_OBJECT_USE_OBJC'
end
+
+ it "adds -w per pod if target definition inhibits warnings for that 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?('-w')
+ end
+
+ it "doesn't inhibit warnings by default" do
+ flags = @installer.send(:compiler_flags_for_consumer, @spec.consumer(:ios))
+ flags.should.not.include?('-w')
+ end
end
end
end
Something went wrong with that request. Please try again.