Commit 38a8e724 authored by Eloy Duran's avatar Eloy Duran

Specify defaults for a XCBuildConfiguration (iOS static library).

parent 14cb718f
...@@ -233,7 +233,21 @@ module Pod ...@@ -233,7 +233,21 @@ module Pod
end end
class XCBuildConfiguration < PBXObject class XCBuildConfiguration < PBXObject
attribute :buildSettings
has_one :baseConfiguration has_one :baseConfiguration
def initialize(*)
super
# TODO These are from an iOS static library, need to check if it works for any product type
self.buildSettings = {
'DSTROOT' => '/tmp/Pods.dst',
'GCC_PRECOMPILE_PREFIX_HEADER' => 'YES',
'GCC_PREFIX_HEADER' => 'Pods-Prefix.pch',
'GCC_VERSION' => 'com.apple.compilers.llvm.clang.1_0',
'PRODUCT_NAME' => '$(TARGET_NAME)',
'SKIP_INSTALL' => 'YES',
}.merge(buildSettings || {})
end
end end
class XCConfigurationList < PBXObject class XCConfigurationList < PBXObject
......
...@@ -137,6 +137,7 @@ describe "Pod::Xcode::Project" do ...@@ -137,6 +137,7 @@ describe "Pod::Xcode::Project" do
'productName' => 'Pods', 'productName' => 'Pods',
'productType' => Pod::Xcode::Project::PBXNativeTarget::STATIC_LIBRARY 'productType' => Pod::Xcode::Project::PBXNativeTarget::STATIC_LIBRARY
}) })
#@target = @project.targets.first
end end
it "returns the product name, which is the name of the binary (minus prefix/suffix)" do it "returns the product name, which is the name of the binary (minus prefix/suffix)" do
...@@ -161,11 +162,18 @@ describe "Pod::Xcode::Project" do ...@@ -161,11 +162,18 @@ describe "Pod::Xcode::Project" do
it "returns the buildConfigurationList" do it "returns the buildConfigurationList" do
list = @target.buildConfigurationList list = @target.buildConfigurationList
list.should.be.instance_of Pod::Xcode::Project::XCConfigurationList list.should.be.instance_of Pod::Xcode::Project::XCConfigurationList
list.buildConfigurations.map(&:name).sort.should == %w{ Debug Release } list.buildConfigurations.each do |configuration|
@target.buildConfigurationListReference = nil configuration.buildSettings.should == {
@target.buildConfigurationList.should == nil 'DSTROOT' => '/tmp/Pods.dst',
@target.buildConfigurationListReference = list.uuid 'GCC_PRECOMPILE_PREFIX_HEADER' => 'YES',
@target.buildConfigurationList.attributes.should == list.attributes 'GCC_PREFIX_HEADER' => 'Pods-Prefix.pch',
# Removed from the default XCBuildConfiguration#buildSettings
#'OTHER_LDFLAGS' => '-ObjC',
'GCC_VERSION' => 'com.apple.compilers.llvm.clang.1_0',
'PRODUCT_NAME' => '$(TARGET_NAME)',
'SKIP_INSTALL' => 'YES',
}
end
end end
it "returns an empty list of dependencies and buildRules (not sure yet which classes those are yet)" do it "returns an empty list of dependencies and buildRules (not sure yet which classes those are yet)" do
......
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