Commit 52c2f915 authored by Samuel E. Giddins's avatar Samuel E. Giddins

[UserProjectIntegrator] Allows the use of the `GCC_PREPROCESSOR_DEFINITION` flag…

[UserProjectIntegrator] Allows the use of the `GCC_PREPROCESSOR_DEFINITION` flag `${inherited}`  without emitting a warning

Closes https://github.com/CocoaPods/CocoaPods/issues/2577
parent df2c0c65
......@@ -11,6 +11,11 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
[Samuel Giddins](https://github.com/segiddins)
[#2470](https://github.com/CocoaPods/CocoaPods/issues/2470)
* Allows the use of the `GCC_PREPROCESSOR_DEFINITION` flag `${inherited}`
without emitting a warning.
[Samuel Giddins](https://github.com/segiddins)
[#2577](https://github.com/CocoaPods/CocoaPods/issues/2577)
##### Bug Fixes
* Improved sanitizing of configuration names to avoid generating invalid
......
......@@ -144,7 +144,7 @@ module Pod
if xcconfig
xcconfig.to_hash.keys.each do |key|
target_value = config.build_settings[key]
if target_value && !target_value.include?('$(inherited)')
if target_value && target_value !~ /\$[({]inherited[})]/
print_override_warning(aggregate_target, user_target, config, key)
end
end
......
......@@ -70,6 +70,20 @@ module Pod
'overrides the `GCC_PREPROCESSOR_DEFINITIONS` build setting'
end
it 'allows the use of the alternate form of the inherited flag' do
UI.warnings = ''
target_config = stub(:name => 'Release', :build_settings => { 'GCC_PREPROCESSOR_DEFINITIONS' => 'FLAG=1 ${inherited}' })
user_target = stub(:name => 'SampleProject', :build_configurations => [target_config])
@library.stubs(:user_targets).returns([user_target])
@library.xcconfigs['Release'] = { 'GCC_PREPROCESSOR_DEFINITIONS' => 'COCOAPODS=1' }
@integrator = UserProjectIntegrator.new(@podfile, config.sandbox, temporary_directory, [@library])
@integrator.unstub(:warn_about_xcconfig_overrides)
@integrator.send(:warn_about_xcconfig_overrides)
UI.warnings.should.not.include 'GCC_PREPROCESSOR_DEFINITIONS'
end
it 'allows build settings which inherit the settings form the CocoaPods xcconfig' do
UI.warnings = ''
target_config = stub(:name => 'Release', :build_settings => { 'GCC_PREPROCESSOR_DEFINITIONS' => 'FLAG=1 $(inherited)' })
......
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