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
a4460fbc
Commit
a4460fbc
authored
May 31, 2017
by
Dimitris Koutsogiorgas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Link `swiftSwiftOnoneSupport` for test xcconfigs
parent
80069e35
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
3 deletions
+46
-3
CHANGELOG.md
CHANGELOG.md
+4
-0
Gemfile.lock
Gemfile.lock
+2
-2
pod_target_installer.rb
...ller/xcode/pods_project_generator/pod_target_installer.rb
+13
-0
pod_xcconfig_spec.rb
spec/unit/generator/xcconfig/pod_xcconfig_spec.rb
+14
-1
pod_target_installer_spec.rb
...xcode/pods_project_generator/pod_target_installer_spec.rb
+13
-0
No files found.
CHANGELOG.md
View file @
a4460fbc
...
@@ -38,6 +38,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -38,6 +38,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#6767
](
https://github.com/CocoaPods/CocoaPods/pull/6767
)
[
#6767
](
https://github.com/CocoaPods/CocoaPods/pull/6767
)
*
Link
`swiftSwiftOnoneSupport`
for test xcconfigs
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#6769
](
https://github.com/CocoaPods/CocoaPods/pull/6769
)
*
Ensure product name for tests is not overridden by custom build settings
*
Ensure product name for tests is not overridden by custom build settings
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#6766
](
https://github.com/CocoaPods/CocoaPods/pull/6766
)
[
#6766
](
https://github.com/CocoaPods/CocoaPods/pull/6766
)
...
...
Gemfile.lock
View file @
a4460fbc
...
@@ -31,7 +31,7 @@ GIT
...
@@ -31,7 +31,7 @@ GIT
GIT
GIT
remote: https://github.com/CocoaPods/Xcodeproj.git
remote: https://github.com/CocoaPods/Xcodeproj.git
revision: 7
355a4eac5d3634725e0925cfbfa46fbcd88b933
revision: 7
6932aa3dce97408361b0cd485deff9a77e3bcb4
branch: master
branch: master
specs:
specs:
xcodeproj (1.4.4)
xcodeproj (1.4.4)
...
@@ -291,4 +291,4 @@ DEPENDENCIES
...
@@ -291,4 +291,4 @@ DEPENDENCIES
xcodeproj!
xcodeproj!
BUNDLED WITH
BUNDLED WITH
1.1
4.6
1.1
5.0
lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb
View file @
a4460fbc
...
@@ -303,12 +303,25 @@ module Pod
...
@@ -303,12 +303,25 @@ module Pod
target
.
test_native_targets
.
each
do
|
test_target
|
target
.
test_native_targets
.
each
do
|
test_target
|
test_target
.
build_configurations
.
each
do
|
test_target_bc
|
test_target
.
build_configurations
.
each
do
|
test_target_bc
|
test_target_swift_debug_hack
(
test_target_bc
)
test_target_bc
.
base_configuration_reference
=
xcconfig_file_ref
test_target_bc
.
base_configuration_reference
=
xcconfig_file_ref
end
end
end
end
end
end
end
end
# Manually add `libswiftSwiftOnoneSupport.dylib` as it seems there is an issue with tests that do not include it for Debug configurations.
# Possibly related to Swift module optimization.
#
# @return [void]
#
def
test_target_swift_debug_hack
(
test_target_bc
)
return
unless
test_target_bc
.
debug?
return
unless
[
target
,
*
target
.
recursive_dependent_targets
].
any?
(
&
:uses_swift?
)
ldflags
=
test_target_bc
.
build_settings
[
'OTHER_LDFLAGS'
]
||=
'$(inherited)'
ldflags
<<
' -lswiftSwiftOnoneSupport'
end
# Creates a build phase which links the versioned header folders
# Creates a build phase which links the versioned header folders
# of the OS X into the framework bundle's root root directory.
# of the OS X into the framework bundle's root root directory.
# This is only necessary because the way how headers are copied
# This is only necessary because the way how headers are copied
...
...
spec/unit/generator/xcconfig/pod_xcconfig_spec.rb
View file @
a4460fbc
...
@@ -148,11 +148,24 @@ module Pod
...
@@ -148,11 +148,24 @@ module Pod
@coconut_pod_target
.
stubs
(
:file_accessors
).
returns
(
file_accessors
)
@coconut_pod_target
.
stubs
(
:file_accessors
).
returns
(
file_accessors
)
end
end
it
'includes correct other ld flags'
do
generator
=
PodXCConfig
.
new
(
@coconut_pod_target
,
true
)
xcconfig
=
generator
.
generate
xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
==
'-ObjC -l"CoconutLib"'
end
it
'includes correct other ld flags when requires frameworks'
do
@coconut_pod_target
.
stubs
(
:requires_frameworks?
).
returns
(
true
)
generator
=
PodXCConfig
.
new
(
@coconut_pod_target
,
true
)
xcconfig
=
generator
.
generate
xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
==
'-ObjC -framework "CoconutLib"'
end
it
'includes other ld flags for test dependent targets'
do
it
'includes other ld flags for test dependent targets'
do
@coconut_pod_target
.
test_dependent_targets
=
[
@monkey_pod_target
]
@coconut_pod_target
.
test_dependent_targets
=
[
@monkey_pod_target
]
generator
=
PodXCConfig
.
new
(
@coconut_pod_target
,
true
)
generator
=
PodXCConfig
.
new
(
@coconut_pod_target
,
true
)
xcconfig
=
generator
.
generate
xcconfig
=
generator
.
generate
xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
include
'
-l"monkey" -framework "dynamic-monkey"'
xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
==
'-ObjC -l"CoconutLib"
-l"monkey" -framework "dynamic-monkey"'
end
end
it
'adds settings for test dependent targets'
do
it
'adds settings for test dependent targets'
do
...
...
spec/unit/installer/xcode/pods_project_generator/pod_target_installer_spec.rb
View file @
a4460fbc
...
@@ -195,6 +195,19 @@ module Pod
...
@@ -195,6 +195,19 @@ module Pod
@coconut_pod_target
.
test_native_targets
.
count
.
should
==
1
@coconut_pod_target
.
test_native_targets
.
count
.
should
==
1
end
end
it
'adds swiftSwiftOnoneSupport ld flag to the debug configuration'
do
@coconut_pod_target
.
stubs
(
:uses_swift?
).
returns
(
true
)
@installer
.
install!
native_test_target
=
@project
.
targets
[
1
]
debug_configuration
=
native_test_target
.
build_configurations
.
find
(
&
:debug?
)
debug_configuration
.
build_settings
[
'OTHER_LDFLAGS'
].
sort
.
should
==
[
'$(inherited)'
,
'-lswiftSwiftOnoneSupport'
,
]
release_configuration
=
native_test_target
.
build_configurations
.
find
{
|
bc
|
bc
.
type
==
:release
}
release_configuration
.
build_settings
[
'OTHER_LDFLAGS'
].
should
.
be
.
nil
end
it
'adds files to build phases correctly depending on the native target'
do
it
'adds files to build phases correctly depending on the native target'
do
@installer
.
install!
@installer
.
install!
@project
.
targets
.
count
.
should
==
2
@project
.
targets
.
count
.
should
==
2
...
...
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