Commit deeb37fa authored by Eloy Durán's avatar Eloy Durán

[AggregateXCConfig] Collect actual values to ensure values aren’t duplicated.

Fixes #1189.
parent eba0124b
...@@ -17,7 +17,7 @@ GIT ...@@ -17,7 +17,7 @@ GIT
GIT GIT
remote: https://github.com/CocoaPods/Xcodeproj.git remote: https://github.com/CocoaPods/Xcodeproj.git
revision: f5b2882cf06db76095957ef20c61e84ebf147f60 revision: f2fb8ba7311ff973e2d27f18fc5ea607e5db7c9e
branch: master branch: master
specs: specs:
xcodeproj (0.8.0) xcodeproj (0.8.0)
...@@ -41,7 +41,7 @@ GIT ...@@ -41,7 +41,7 @@ GIT
GIT GIT
remote: https://github.com/irrationalfab/PrettyBacon.git remote: https://github.com/irrationalfab/PrettyBacon.git
revision: c42de649708149bbfb5fb5beefa65440855cf876 revision: 0da7e231bf597005aaa4efb4c2cd837336a6b42b
branch: master branch: master
specs: specs:
prettybacon (0.0.1) prettybacon (0.0.1)
......
...@@ -15,27 +15,19 @@ module Pod ...@@ -15,27 +15,19 @@ module Pod
# @return [Xcodeproj::Config] # @return [Xcodeproj::Config]
# #
def generate def generate
config = { @xcconfig = Xcodeproj::Config.new({
'OTHER_LDFLAGS' => default_ld_flags, 'OTHER_LDFLAGS' => default_ld_flags,
'HEADER_SEARCH_PATHS' => quote(sandbox.public_headers.search_paths), 'HEADER_SEARCH_PATHS' => quote(sandbox.public_headers.search_paths),
'PODS_ROOT' => target.relative_pods_root, 'PODS_ROOT' => target.relative_pods_root,
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) COCOAPODS=1', 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) COCOAPODS=1',
} })
target.pod_targets.each do |pod_target| target.pod_targets.each do |pod_target|
xcconfig = Xcodeproj::Config.new
pod_target.spec_consumers.each do |consumer| pod_target.spec_consumers.each do |consumer|
add_spec_build_settings_to_xcconfig(consumer, xcconfig) add_spec_build_settings_to_xcconfig(consumer, @xcconfig)
end
xcconfig.to_hash.each do |k, v|
prefixed_key = pod_target.xcconfig_prefix + k
config[k] = "#{config[k]} ${#{prefixed_key}}"
end end
end end
@xcconfig = Xcodeproj::Config.new(config)
@xcconfig.includes = target.pod_targets.map(&:name)
@xcconfig @xcconfig
end end
......
...@@ -69,10 +69,6 @@ module Pod ...@@ -69,10 +69,6 @@ module Pod
@xcconfig.to_hash['GCC_PREPROCESSOR_DEFINITIONS'].should.include '$(inherited)' @xcconfig.to_hash['GCC_PREPROCESSOR_DEFINITIONS'].should.include '$(inherited)'
end end
it 'adds the pod namespaced configuration items' do
@xcconfig.to_hash['OTHER_LDFLAGS'].should.include("${#{@pod_target.xcconfig_prefix}OTHER_LDFLAGS}")
end
#-----------------------------------------------------------------------# #-----------------------------------------------------------------------#
before do before do
...@@ -85,10 +81,5 @@ module Pod ...@@ -85,10 +81,5 @@ module Pod
generated.class.should == Xcodeproj::Config generated.class.should == Xcodeproj::Config
end end
it "includes the namespaced public pod xcconfig file" do
generated = Xcodeproj::Config.new(@path)
generated.includes.should.include("#{@pod_target.label}.xcconfig")
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