Commit 1238317f authored by Fabio Pelosin's avatar Fabio Pelosin

[TargetInstaller] Create unique hash instances for the build settings

Closes #1014
parent 825ab991
......@@ -80,7 +80,7 @@ module Pod
unless @target.build_configurations.map(&:name).include?(bc_name)
build_config = project.new(Xcodeproj::Project::XCBuildConfiguration)
build_config.name = bc_name
settings = @target.build_settings(type.to_s.capitalize)
settings = @target.build_settings(type.to_s.capitalize).dup
build_config.build_settings = settings
target.build_configurations << build_config
end
......
......@@ -105,7 +105,7 @@ module Pod
it "adds the settings of the xcconfig that need to be overridden to the target" do
@installer.install!
build_configuration = @project.targets.first.build_configurations
build_settings = build_configuration.first.build_settings
build_settings = build_configuration.first.build_settings
Generator::XCConfig.pods_project_settings.each do |key, value|
build_settings[key].should == value
end
......@@ -116,6 +116,12 @@ module Pod
@project.targets.first.build_configurations.map(&:name).sort.should == %w{ AppStore Debug Release Test }
end
it "it creates different hash instances for the build settings of various build configurations" do
@installer.install!
build_settings = @project.targets.first.build_configurations.map(&:build_settings)
build_settings.map(&:object_id).uniq.count.should == 4
end
it "does not enable the GCC_WARN_INHIBIT_ALL_WARNINGS flag by default" do
@installer.install!
@installer.library.target.build_configurations.each do |config|
......
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