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
8b86603e
Commit
8b86603e
authored
Sep 22, 2015
by
Boris Bügling
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4219 from CocoaPods/fix-search-path
Remove SDKROOT relative search path
parents
24e80948
b7a7547c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
33 deletions
+13
-33
CHANGELOG.md
CHANGELOG.md
+5
-0
xcconfig_helper.rb
lib/cocoapods/generator/xcconfig/xcconfig_helper.rb
+2
-7
pod_xcconfig_spec.rb
spec/unit/generator/xcconfig/pod_xcconfig_spec.rb
+0
-8
xcconfig_helper_spec.rb
spec/unit/generator/xcconfig/xcconfig_helper_spec.rb
+6
-18
No files found.
CHANGELOG.md
View file @
8b86603e
...
@@ -16,6 +16,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -16,6 +16,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
flags set correctly.
flags set correctly.
[
Andrea Aresu
](
https://github.com/aaresu/
)
[
Andrea Aresu
](
https://github.com/aaresu/
)
*
Remove SDKROOT relative search path as it isn't needed anymore since XCTest.
[
Boris Bügling
](
https://github.com/neonichu
)
[
#4219
](
https://github.com/CocoaPods/CocoaPods/issues/4219
)
## 0.39.0.beta.4 (2015-09-02)
## 0.39.0.beta.4 (2015-09-02)
##### Bug Fixes
##### Bug Fixes
...
...
lib/cocoapods/generator/xcconfig/xcconfig_helper.rb
View file @
8b86603e
...
@@ -74,7 +74,7 @@ module Pod
...
@@ -74,7 +74,7 @@ module Pod
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
)
add_developers_frameworks_if_needed
(
xcconfig
,
consumer
.
platform_name
)
add_developers_frameworks_if_needed
(
xcconfig
)
end
end
# Configures the given Xcconfig with the build settings for the given
# Configures the given Xcconfig with the build settings for the given
...
@@ -183,17 +183,12 @@ module Pod
...
@@ -183,17 +183,12 @@ module Pod
#
#
# @return [void]
# @return [void]
#
#
def
self
.
add_developers_frameworks_if_needed
(
xcconfig
,
platform
)
def
self
.
add_developers_frameworks_if_needed
(
xcconfig
)
matched_frameworks
=
xcconfig
.
frameworks
&
%w(XCTest SenTestingKit)
matched_frameworks
=
xcconfig
.
frameworks
&
%w(XCTest SenTestingKit)
unless
matched_frameworks
.
empty?
unless
matched_frameworks
.
empty?
search_paths
=
xcconfig
.
attributes
[
'FRAMEWORK_SEARCH_PATHS'
]
||=
''
search_paths
=
xcconfig
.
attributes
[
'FRAMEWORK_SEARCH_PATHS'
]
||=
''
search_paths_to_add
=
[]
search_paths_to_add
=
[]
search_paths_to_add
<<
'$(inherited)'
search_paths_to_add
<<
'$(inherited)'
if
platform
==
:ios
||
platform
==
:watchos
search_paths_to_add
<<
'"$(SDKROOT)/Developer/Library/Frameworks"'
else
search_paths_to_add
<<
'"$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
end
frameworks_path
=
'"$(PLATFORM_DIR)/Developer/Library/Frameworks"'
frameworks_path
=
'"$(PLATFORM_DIR)/Developer/Library/Frameworks"'
search_paths_to_add
<<
frameworks_path
search_paths_to_add
<<
frameworks_path
search_paths_to_add
.
each
do
|
search_path
|
search_paths_to_add
.
each
do
|
search_path
|
...
...
spec/unit/generator/xcconfig/pod_xcconfig_spec.rb
View file @
8b86603e
...
@@ -47,14 +47,6 @@ module Pod
...
@@ -47,14 +47,6 @@ module Pod
@xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
include
(
'-weak_framework "iAd"'
)
@xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
include
(
'-weak_framework "iAd"'
)
end
end
it
'includes the developer frameworks search paths when SenTestingKit is detected'
do
@spec
.
xcconfig
=
{
'OTHER_LDFLAGS'
=>
'-no_compact_unwind'
}
@spec
.
frameworks
=
[
'SenTestingKit'
]
xcconfig
=
@generator
.
generate
framework_search_paths
=
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
]
framework_search_paths
.
should
.
include
(
'$(SDKROOT)/Developer'
)
end
it
'does not configure the project to load all members that implement Objective-c classes or categories from the static library'
do
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'
@xcconfig
.
to_hash
[
'OTHER_LDFLAGS'
].
should
.
not
.
include
'-ObjC'
end
end
...
...
spec/unit/generator/xcconfig/xcconfig_helper_spec.rb
View file @
8b86603e
...
@@ -99,7 +99,7 @@ module Pod
...
@@ -99,7 +99,7 @@ module Pod
:platform_name
=>
:ios
,
:platform_name
=>
:ios
,
)
)
@sut
.
add_spec_build_settings_to_xcconfig
(
consumer
,
xcconfig
)
@sut
.
add_spec_build_settings_to_xcconfig
(
consumer
,
xcconfig
)
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
].
should
.
include
(
'SDKROOT'
)
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
].
should
.
not
.
include
(
'SDKROOT'
)
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
].
should
.
not
.
include
(
'DEVELOPER_LIBRARY_DIR'
)
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
].
should
.
not
.
include
(
'DEVELOPER_LIBRARY_DIR'
)
end
end
...
@@ -113,7 +113,7 @@ module Pod
...
@@ -113,7 +113,7 @@ module Pod
:platform_name
=>
:osx
,
:platform_name
=>
:osx
,
)
)
@sut
.
add_spec_build_settings_to_xcconfig
(
consumer
,
xcconfig
)
@sut
.
add_spec_build_settings_to_xcconfig
(
consumer
,
xcconfig
)
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
].
should
.
include
(
'DEVELOPER_LIBRARY_DIR'
)
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
].
should
.
not
.
include
(
'DEVELOPER_LIBRARY_DIR'
)
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
].
should
.
not
.
include
(
'SDKROOT'
)
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
].
should
.
not
.
include
(
'SDKROOT'
)
end
end
end
end
...
@@ -165,35 +165,23 @@ module Pod
...
@@ -165,35 +165,23 @@ module Pod
describe
'::add_developers_frameworks_if_needed'
do
describe
'::add_developers_frameworks_if_needed'
do
it
'adds the developer frameworks search paths to the xcconfig if SenTestingKit has been detected'
do
it
'adds the developer frameworks search paths to the xcconfig if SenTestingKit has been detected'
do
xcconfig
=
Xcodeproj
::
Config
.
new
(
'OTHER_LDFLAGS'
=>
'-framework SenTestingKit'
)
xcconfig
=
Xcodeproj
::
Config
.
new
(
'OTHER_LDFLAGS'
=>
'-framework SenTestingKit'
)
@sut
.
add_developers_frameworks_if_needed
(
xcconfig
,
:ios
)
@sut
.
add_developers_frameworks_if_needed
(
xcconfig
)
frameworks_search_paths
=
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
]
frameworks_search_paths
=
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
]
frameworks_search_paths
.
should
.
include?
(
'$(inherited)'
)
frameworks_search_paths
.
should
.
include?
(
'$(inherited)'
)
frameworks_search_paths
.
should
.
include?
(
'"$(SDKROOT)/Developer/Library/Frameworks"'
)
frameworks_search_paths
.
should
.
not
.
include?
(
'"$(SDKROOT)/Developer/Library/Frameworks"'
)
frameworks_search_paths
.
should
.
not
.
include?
(
'"$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
)
frameworks_search_paths
.
should
.
not
.
include?
(
'"$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
)
end
end
it
'adds the developer frameworks search paths to the xcconfig if XCTest has been detected'
do
it
'adds the developer frameworks search paths to the xcconfig if XCTest has been detected'
do
xcconfig
=
Xcodeproj
::
Config
.
new
(
'OTHER_LDFLAGS'
=>
'-framework XCTest'
)
xcconfig
=
Xcodeproj
::
Config
.
new
(
'OTHER_LDFLAGS'
=>
'-framework XCTest'
)
@sut
.
add_developers_frameworks_if_needed
(
xcconfig
,
:ios
)
@sut
.
add_developers_frameworks_if_needed
(
xcconfig
)
frameworks_search_paths
=
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
]
frameworks_search_paths
=
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
]
frameworks_search_paths
.
should
.
include?
(
'$(inherited)'
)
frameworks_search_paths
.
should
.
include?
(
'$(inherited)'
)
frameworks_search_paths
.
should
.
include?
(
'"$(SDKROOT)/Developer/Library/Frameworks"'
)
frameworks_search_paths
.
should
.
not
.
include?
(
'"$(SDKROOT)/Developer/Library/Frameworks"'
)
frameworks_path
=
'"$(PLATFORM_DIR)/Developer/Library/Frameworks"'
frameworks_path
=
'"$(PLATFORM_DIR)/Developer/Library/Frameworks"'
frameworks_search_paths
.
should
.
include?
(
frameworks_path
)
frameworks_search_paths
.
should
.
include?
(
frameworks_path
)
frameworks_search_paths
.
should
.
not
.
include?
(
'"$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
)
frameworks_search_paths
.
should
.
not
.
include?
(
'"$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
)
end
end
it
"doesn't adds the developer frameworks relative to the SDK for OS X"
do
xcconfig
=
Xcodeproj
::
Config
.
new
(
'OTHER_LDFLAGS'
=>
'-framework XCTest'
)
@sut
.
add_developers_frameworks_if_needed
(
xcconfig
,
:ios
)
frameworks_search_paths
=
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
]
frameworks_search_paths
.
should
.
include?
(
'"$(SDKROOT)/Developer/Library/Frameworks"'
)
xcconfig
=
Xcodeproj
::
Config
.
new
(
'OTHER_LDFLAGS'
=>
'-framework XCTest'
)
@sut
.
add_developers_frameworks_if_needed
(
xcconfig
,
:osx
)
frameworks_search_paths
=
xcconfig
.
to_hash
[
'FRAMEWORK_SEARCH_PATHS'
]
frameworks_search_paths
.
should
.
not
.
include?
(
'"$(SDKROOT)/Developer/Library/Frameworks"'
)
end
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