Permalink
Browse files

[inhibit_all_warningsDon't affect the final project.

  • Loading branch information...
1 parent ac655b6 commit dc04fc22b9b974dcd23b84488b3b6b5f0cde9f8f @fabiopelosin fabiopelosin committed Aug 22, 2012
Showing with 18 additions and 5 deletions.
  1. +8 −1 CHANGELOG.md
  2. +2 −2 lib/cocoapods/installer/target_installer.rb
  3. +8 −2 spec/unit/installer/target_installer_spec.rb
View
@@ -1,3 +1,10 @@
+## Master
+[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.12.0...master)
+
+###### Bug fixes
+
+- The final project isn’t affected anymore by the `inhibit_all_warnings!` option.
+
## 0.12.0
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.11.1...0.12.0)
@@ -10,7 +17,7 @@
- Don’t impose a certain structure of the user’s project by raising if no ‘Frameworks’ group exists. [#431](https://github.com/CocoaPods/CocoaPods/pull/431)
- Support for GitHub Gists in the linter.
- Allow specifying ARC settings in subspecs.
-- Add Podfile#inhibit_all_warnings! which will inhibit all warnings from the Pods library. [#209](https://github.com/CocoaPods/CocoaPods/issues/209)
+- Add Podfile `inhibit_all_warnings!` which will inhibit all warnings from the Pods library. [#209](https://github.com/CocoaPods/CocoaPods/issues/209)
- Make the Pods Xcode project prettier by namespacing subspecs in nested groups. [#466](https://github.com/CocoaPods/CocoaPods/pull/466)
@@ -16,8 +16,7 @@ def xcconfig
'PODS_ROOT' => @target_definition.relative_pods_root,
'PODS_HEADERS_SEARCH_PATHS' => '${PODS_PUBLIC_HEADERS_SEARCH_PATHS}',
'ALWAYS_SEARCH_USER_PATHS' => 'YES', # needed to make EmbedReader build
- 'OTHER_LDFLAGS' => default_ld_flags,
- 'GCC_WARN_INHIBIT_ALL_WARNINGS' => @target_definition.inhibit_all_warnings? ? 'YES' : 'NO',
+ 'OTHER_LDFLAGS' => default_ld_flags
})
end
@@ -93,6 +92,7 @@ def configure_build_configurations(xcconfig_file, sandbox)
config.build_settings['GCC_PREFIX_HEADER'] = @target_definition.prefix_header_name
config.build_settings['PODS_ROOT'] = '${SRCROOT}'
config.build_settings['PODS_HEADERS_SEARCH_PATHS'] = '${PODS_BUILD_HEADERS_SEARCH_PATHS}'
+ config.build_settings['GCC_WARN_INHIBIT_ALL_WARNINGS'] = @target_definition.inhibit_all_warnings? ? 'YES' : 'NO'
end
end
@@ -67,12 +67,18 @@ def do_install!
end
it "does not enable the GCC_WARN_INHIBIT_ALL_WARNINGS flag by default" do
- @installer.xcconfig.to_hash['GCC_WARN_INHIBIT_ALL_WARNINGS'].should == 'NO'
+ do_install!
+ @installer.target.build_configurations.each do |config|
+ config.build_settings['GCC_WARN_INHIBIT_ALL_WARNINGS'].should == 'NO'
+ end
end
it "enables the GCC_WARN_INHIBIT_ALL_WARNINGS flag" do
@podfile.inhibit_all_warnings!
- @installer.xcconfig.to_hash['GCC_WARN_INHIBIT_ALL_WARNINGS'].should == 'YES'
+ do_install!
+ @installer.target.build_configurations.each do |config|
+ config.build_settings['GCC_WARN_INHIBIT_ALL_WARNINGS'].should == 'YES'
+ end
end
it "creates a prefix header, including the contents of the specification's prefix header file" do

3 comments on commit dc04fc2

Owner

fabiopelosin commented on dc04fc2 Aug 22, 2012

@alloy cc.

Btw, do you think that we shall remove all the -W-no flags from the podspecs?

Owner

alloy replied Aug 22, 2012

Ah crap, I had indeed set it on the whole project instead of the single targets… Thanks :)

Yeah that might be a good idea. That way users will be able to see all of the issues they might have.

Owner

fabiopelosin replied Aug 22, 2012

Yeah that might be a good idea. That way users will be able to see all of the issues they might have.

Added to the linter.

Please sign in to comment.