Commit 855fa399 authored by Eloy Durán's avatar Eloy Durán

Merge pull request #20 from kommen/master

Add per podspec compiler flags support and Specification#requires_arc shortcut
parents a0c7f1d5 e0a136b2
......@@ -56,7 +56,7 @@ module Pod
# Only add implementation files to the compile phase
spec.implementation_files.each do |file|
xcodeproj.add_source_file(file, spec.name)
xcodeproj.add_source_file(file, spec.name, nil, spec.compiler_flags)
end
# Add header files to a `copy header build phase` for each destination
......
......@@ -106,6 +106,15 @@ module Pod
@header_dir || pod_destroot_name
end
attr_accessor :requires_arc
attr_writer :compiler_flags
def compiler_flags
flags = "#{@compiler_flags} "
flags << '-fobj-arc' if @requires_arc
flags
end
# Not attributes
include Config::Mixin
......
......@@ -123,6 +123,14 @@ describe "A Pod::Specification loaded from a podspec" do
it "never equals when it's from a Podfile" do
Pod::Spec.new.should.not == Pod::Spec.new
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
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