Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
e0a136b2
Commit
e0a136b2
authored
Oct 11, 2011
by
Dieter Komendera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Specification#requires_arc shortcut to add -fobj-arc compiler flag.
parent
c23809e2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
specification.rb
lib/cocoapods/specification.rb
+7
-3
specification_spec.rb
spec/unit/specification_spec.rb
+8
-0
No files found.
lib/cocoapods/specification.rb
View file @
e0a136b2
...
...
@@ -106,10 +106,14 @@ module Pod
@header_dir
||
pod_destroot_name
end
def
compiler_flags
=
(
flags
)
@compiler_flags
=
flags
attr_accessor
:requires_arc
attr_writer
:compiler_flags
def
compiler_flags
flags
=
"
#{
@compiler_flags
}
"
flags
<<
'-fobj-arc'
if
@requires_arc
flags
end
attr_reader
:compiler_flags
# Not attributes
...
...
spec/unit/specification_spec.rb
View file @
e0a136b2
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment