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
b28b70aa
Commit
b28b70aa
authored
Jul 27, 2015
by
Marius Rackwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XCConfig] Don't apply pod_target_xcconfig to aggregate target
Fixes #3906.
parent
3ff30dc6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
16 deletions
+14
-16
pod_xcconfig.rb
lib/cocoapods/generator/xcconfig/pod_xcconfig.rb
+3
-0
xcconfig_helper.rb
lib/cocoapods/generator/xcconfig/xcconfig_helper.rb
+0
-1
aggregate_xcconfig_spec.rb
spec/unit/generator/xcconfig/aggregate_xcconfig_spec.rb
+7
-0
pod_xcconfig_spec.rb
spec/unit/generator/xcconfig/pod_xcconfig_spec.rb
+4
-2
xcconfig_helper_spec.rb
spec/unit/generator/xcconfig/xcconfig_helper_spec.rb
+0
-13
No files found.
lib/cocoapods/generator/xcconfig/pod_xcconfig.rb
View file @
b28b70aa
...
@@ -66,6 +66,9 @@ module Pod
...
@@ -66,6 +66,9 @@ module Pod
@xcconfig
=
Xcodeproj
::
Config
.
new
(
config
)
@xcconfig
=
Xcodeproj
::
Config
.
new
(
config
)
XCConfigHelper
.
add_settings_for_file_accessors_of_target
(
target
,
@xcconfig
)
XCConfigHelper
.
add_settings_for_file_accessors_of_target
(
target
,
@xcconfig
)
target
.
file_accessors
.
each
do
|
file_accessor
|
@xcconfig
.
merge!
(
file_accessor
.
spec_consumer
.
pod_target_xcconfig
)
end
XCConfigHelper
.
add_target_specific_settings
(
target
,
@xcconfig
)
XCConfigHelper
.
add_target_specific_settings
(
target
,
@xcconfig
)
@xcconfig
@xcconfig
end
end
...
...
lib/cocoapods/generator/xcconfig/xcconfig_helper.rb
View file @
b28b70aa
...
@@ -71,7 +71,6 @@ module Pod
...
@@ -71,7 +71,6 @@ module Pod
# The xcconfig to edit.
# The xcconfig to edit.
#
#
def
self
.
add_spec_build_settings_to_xcconfig
(
consumer
,
xcconfig
)
def
self
.
add_spec_build_settings_to_xcconfig
(
consumer
,
xcconfig
)
xcconfig
.
merge!
(
consumer
.
pod_target_xcconfig
)
xcconfig
.
libraries
.
merge
(
consumer
.
libraries
)
xcconfig
.
libraries
.
merge
(
consumer
.
libraries
)
xcconfig
.
frameworks
.
merge
(
consumer
.
frameworks
)
xcconfig
.
frameworks
.
merge
(
consumer
.
frameworks
)
xcconfig
.
weak_frameworks
.
merge
(
consumer
.
weak_frameworks
)
xcconfig
.
weak_frameworks
.
merge
(
consumer
.
weak_frameworks
)
...
...
spec/unit/generator/xcconfig/aggregate_xcconfig_spec.rb
View file @
b28b70aa
...
@@ -14,6 +14,8 @@ module Pod
...
@@ -14,6 +14,8 @@ module Pod
before
do
before
do
@spec
=
spec
@spec
=
spec
@spec
.
user_target_xcconfig
=
{
'OTHER_LDFLAGS'
=>
'-no_compact_unwind'
}
@spec
.
pod_target_xcconfig
=
{
'CLANG_CXX_LANGUAGE_STANDARD'
=>
'c++11'
}
@pod_target
=
pod_target
(
@spec
)
@pod_target
=
pod_target
(
@spec
)
@consumer
=
@pod_target
.
spec_consumers
.
last
@consumer
=
@pod_target
.
spec_consumers
.
last
@target
=
fixture_aggregate_target
([
@pod_target
])
@target
=
fixture_aggregate_target
([
@pod_target
])
...
@@ -38,6 +40,11 @@ module Pod
...
@@ -38,6 +40,11 @@ module Pod
@xcconfig
.
class
.
should
==
Xcodeproj
::
Config
@xcconfig
.
class
.
should
==
Xcodeproj
::
Config
end
end
it
'includes only the user_target_xcconfig of the specifications'
do
@xcconfig
.
to_hash
[
'CLANG_CXX_LANGUAGE_STANDARD'
].
should
.
be
.
nil
@xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
include
(
'-no_compact_unwind'
)
end
it
'does not add the -fobjc-arc to OTHER_LDFLAGS by default as Xcode 4.3.2 does not support it'
do
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
)
@consumer
.
stubs
(
:requires_arc?
).
returns
(
true
)
@xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
not
.
include
(
'-fobjc-arc'
)
@xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
not
.
include
(
'-fobjc-arc'
)
...
...
spec/unit/generator/xcconfig/pod_xcconfig_spec.rb
View file @
b28b70aa
...
@@ -12,7 +12,8 @@ module Pod
...
@@ -12,7 +12,8 @@ module Pod
@podfile
=
@pod_target
.
podfile
@podfile
=
@pod_target
.
podfile
@generator
=
PodXCConfig
.
new
(
@pod_target
)
@generator
=
PodXCConfig
.
new
(
@pod_target
)
@spec
.
xcconfig
=
{
'OTHER_LDFLAGS'
=>
'-no_compact_unwind'
}
@spec
.
pod_target_xcconfig
=
{
'OTHER_LDFLAGS'
=>
'-no_compact_unwind'
}
@spec
.
user_target_xcconfig
=
{
'CLANG_CXX_LANGUAGE_STANDARD'
=>
'c++11'
}
@spec
.
frameworks
=
[
'QuartzCore'
]
@spec
.
frameworks
=
[
'QuartzCore'
]
@spec
.
weak_frameworks
=
[
'iAd'
]
@spec
.
weak_frameworks
=
[
'iAd'
]
@spec
.
libraries
=
[
'xml2'
]
@spec
.
libraries
=
[
'xml2'
]
...
@@ -29,7 +30,8 @@ module Pod
...
@@ -29,7 +30,8 @@ module Pod
@xcconfig
.
class
.
should
==
Xcodeproj
::
Config
@xcconfig
.
class
.
should
==
Xcodeproj
::
Config
end
end
it
'includes the xcconfig of the specifications'
do
it
'includes only the pod_target_xcconfig of the specifications'
do
@xcconfig
.
to_hash
[
'CLANG_CXX_LANGUAGE_STANDARD'
].
should
.
be
.
nil
@xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
include
(
'-no_compact_unwind'
)
@xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
include
(
'-no_compact_unwind'
)
end
end
...
...
spec/unit/generator/xcconfig/xcconfig_helper_spec.rb
View file @
b28b70aa
...
@@ -50,19 +50,6 @@ module Pod
...
@@ -50,19 +50,6 @@ module Pod
#---------------------------------------------------------------------#
#---------------------------------------------------------------------#
describe
'::add_spec_build_settings_to_xcconfig'
do
describe
'::add_spec_build_settings_to_xcconfig'
do
it
'adds the build settings of the consumer'
do
xcconfig
=
Xcodeproj
::
Config
.
new
consumer
=
stub
(
:pod_target_xcconfig
=>
{
'OTHER_LDFLAGS'
=>
'-framework SenTestingKit'
},
:libraries
=>
[],
:frameworks
=>
[],
:weak_frameworks
=>
[],
:platform_name
=>
:ios
,
)
@sut
.
add_spec_build_settings_to_xcconfig
(
consumer
,
xcconfig
)
xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
==
'-framework "SenTestingKit"'
end
it
'adds the libraries of the xcconfig'
do
it
'adds the libraries of the xcconfig'
do
xcconfig
=
Xcodeproj
::
Config
.
new
xcconfig
=
Xcodeproj
::
Config
.
new
consumer
=
stub
(
consumer
=
stub
(
...
...
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