Commit e0a136b2 authored by Dieter Komendera's avatar Dieter Komendera

Add Specification#requires_arc shortcut to add -fobj-arc compiler flag.

parent c23809e2
...@@ -106,10 +106,14 @@ module Pod ...@@ -106,10 +106,14 @@ module Pod
@header_dir || pod_destroot_name @header_dir || pod_destroot_name
end end
def compiler_flags=(flags) attr_accessor :requires_arc
@compiler_flags = flags
attr_writer :compiler_flags
def compiler_flags
flags = "#{@compiler_flags} "
flags << '-fobj-arc' if @requires_arc
flags
end end
attr_reader :compiler_flags
# Not attributes # Not attributes
......
...@@ -123,6 +123,14 @@ describe "A Pod::Specification loaded from a podspec" do ...@@ -123,6 +123,14 @@ describe "A Pod::Specification loaded from a podspec" do
it "never equals when it's from a Podfile" do it "never equals when it's from a Podfile" do
Pod::Spec.new.should.not == Pod::Spec.new Pod::Spec.new.should.not == Pod::Spec.new
end end
it "adds compiler flags if ARC is required" do
@spec.requires_arc = true
@spec.compiler_flags.should == " -fobj-arc"
@spec.compiler_flags = "-Wunused-value"
@spec.compiler_flags.should == "-Wunused-value -fobj-arc"
end
end end
describe "A Pod::Specification that's part of another pod's source" do describe "A Pod::Specification that's part of another pod's source" 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