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
0f765dcb
Commit
0f765dcb
authored
Jul 02, 2015
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update XCConfig specs for partial removal of the -ObjC ld flag
parent
cfce5e9e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
8 deletions
+22
-8
xcconfig_helper.rb
lib/cocoapods/generator/xcconfig/xcconfig_helper.rb
+1
-1
cocoapods-integration-specs
spec/cocoapods-integration-specs
+1
-1
aggregate_xcconfig_spec.rb
spec/unit/generator/xcconfig/aggregate_xcconfig_spec.rb
+12
-4
private_pod_xcconfig_spec.rb
spec/unit/generator/xcconfig/private_pod_xcconfig_spec.rb
+2
-2
xcconfig_helper_spec.rb
spec/unit/generator/xcconfig/xcconfig_helper_spec.rb
+6
-0
No files found.
lib/cocoapods/generator/xcconfig/xcconfig_helper.rb
View file @
0f765dcb
...
...
@@ -38,7 +38,7 @@ module Pod
target
.
spec_consumers
.
any?
(
&
:requires_arc?
)
ld_flags
<<
' -fobjc-arc'
end
ld_flags
ld_flags
.
strip
end
# Configures the given Xcconfig
...
...
cocoapods-integration-specs
@
99cf7a48
Subproject commit
6d4b38764f551fcda4da634ba777640d96162b56
Subproject commit
99cf7a48d31f8d48aff0266d46ae950b4c28d804
spec/unit/generator/xcconfig/aggregate_xcconfig_spec.rb
View file @
0f765dcb
...
...
@@ -38,10 +38,6 @@ module Pod
@xcconfig
.
class
.
should
==
Xcodeproj
::
Config
end
it
'configures the project to load all members that implement Objective-c classes or categories'
do
@xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
include
'-ObjC'
end
it
'does not add the -fobjc-arc to OTHER_LDFLAGS by default as Xcode 4.3.2 does not support it'
do
@consumer
.
stubs
(
:requires_arc?
).
returns
(
true
)
@xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
not
.
include
(
'-fobjc-arc'
)
...
...
@@ -97,6 +93,10 @@ module Pod
behaves_like
'AggregateXCConfig'
it
'configures the project to load all members that implement Objective-c classes or categories'
do
@xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
include
'-ObjC'
end
it
'adds the sandbox public headers search paths to the xcconfig, with quotes, as header search paths'
do
expected
=
"$(inherited)
\"
#{
config
.
sandbox
.
public_headers
.
search_paths
(
:ios
).
join
(
'" "'
)
}
\"
"
@xcconfig
.
to_hash
[
'HEADER_SEARCH_PATHS'
].
should
==
expected
...
...
@@ -141,6 +141,10 @@ module Pod
behaves_like
'AggregateXCConfig'
it
"doesn't configure the project to load all members that implement Objective-c classes or categories"
do
@xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
not
.
include
'-ObjC'
end
describe
'with a vendored-library pod'
do
def
spec
fixture_spec
(
'monkey/monkey.podspec'
)
...
...
@@ -149,6 +153,10 @@ module Pod
it
'does not add the framework build path to the xcconfig'
do
@xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
].
should
.
be
.
nil?
end
it
'configures the project to load all members that implement Objective-c classes or categories'
do
@xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
include
'-ObjC'
end
end
it
'sets the PODS_FRAMEWORK_BUILD_PATH build variable'
do
...
...
spec/unit/generator/xcconfig/private_pod_xcconfig_spec.rb
View file @
0f765dcb
...
...
@@ -19,8 +19,8 @@ module Pod
@xcconfig
.
class
.
should
==
Xcodeproj
::
Config
end
it
'
configures
the project to load all members that implement Objective-c classes or categories from the static library'
do
@xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
include
'-ObjC'
it
'
does not configure
the project to load all members that implement Objective-c classes or categories from the static library'
do
@xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
not
.
include
'-ObjC'
end
it
'does not add the -fobjc-arc to OTHER_LDFLAGS by default as Xcode 4.3.2 does not support it'
do
...
...
spec/unit/generator/xcconfig/xcconfig_helper_spec.rb
View file @
0f765dcb
...
...
@@ -15,6 +15,9 @@ module Pod
podfile
=
stub
(
:set_arc_compatibility_flag?
=>
false
)
target
=
stub
(
:podfile
=>
podfile
)
result
=
@sut
.
default_ld_flags
(
target
)
result
.
should
==
''
result
=
@sut
.
default_ld_flags
(
target
,
true
)
result
.
should
==
'-ObjC'
end
...
...
@@ -23,6 +26,9 @@ module Pod
spec_consumer
=
stub
(
:requires_arc?
=>
true
)
target
=
stub
(
:podfile
=>
podfile
,
:spec_consumers
=>
[
spec_consumer
])
result
=
@sut
.
default_ld_flags
(
target
)
result
.
should
==
'-fobjc-arc'
result
=
@sut
.
default_ld_flags
(
target
,
true
)
result
.
should
==
'-ObjC -fobjc-arc'
end
end
...
...
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