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
396995c7
Commit
396995c7
authored
Jan 24, 2018
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XCConfig] Ensure array settings always have $(inherited) at their head
parent
cc5ba373
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
14 deletions
+17
-14
aggregate_xcconfig.rb
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
+11
-9
pod_xcconfig.rb
lib/cocoapods/generator/xcconfig/pod_xcconfig.rb
+4
-3
pod_xcconfig_spec.rb
spec/unit/generator/xcconfig/pod_xcconfig_spec.rb
+2
-2
No files found.
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
View file @
396995c7
...
...
@@ -55,12 +55,16 @@ module Pod
includes_static_libs
=
!
target
.
requires_frameworks?
includes_static_libs
||=
pod_targets
.
flat_map
(
&
:file_accessors
).
any?
{
|
fa
|
!
fa
.
vendored_static_artifacts
.
empty?
}
config
=
{
'FRAMEWORK_SEARCH_PATHS'
=>
'$(inherited) '
,
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'$(inherited) COCOAPODS=1'
,
'HEADER_SEARCH_PATHS'
=>
'$(inherited) '
,
'LIBRARY_SEARCH_PATHS'
=>
'$(inherited) '
,
'OTHER_CFLAGS'
=>
'$(inherited) '
,
'OTHER_LDFLAGS'
=>
'$(inherited) '
+
XCConfigHelper
.
default_ld_flags
(
target
,
includes_static_libs
),
'OTHER_SWIFT_FLAGS'
=>
'$(inherited) '
,
'PODS_PODFILE_DIR_PATH'
=>
target
.
podfile_dir_relative_path
,
'PODS_ROOT'
=>
target
.
relative_pods_root
,
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'$(inherited) COCOAPODS=1'
,
'FRAMEWORK_SEARCH_PATHS'
=>
'$(inherited) '
,
'LIBRARY_SEARCH_PATHS'
=>
'$(inherited) '
,
'SWIFT_INCLUDE_PATHS'
=>
'$(inherited) '
,
}.
merge
(
embedded_content_settings
)
@xcconfig
=
Xcodeproj
::
Config
.
new
(
config
)
...
...
@@ -140,25 +144,23 @@ module Pod
end
build_settings
=
{
# Make framework headers discoverable by `import "…"`
'OTHER_CFLAGS'
=>
'$(inherited) '
+
XCConfigHelper
.
quote
(
framework_header_search_paths
,
'-iquote'
),
'OTHER_CFLAGS'
=>
XCConfigHelper
.
quote
(
framework_header_search_paths
,
'-iquote'
),
}
if
pod_targets
.
any?
{
|
t
|
!
t
.
should_build?
}
# Make library headers discoverable by `#import "…"`
library_header_search_paths
=
target
.
sandbox
.
public_headers
.
search_paths
(
target
.
platform
)
build_settings
[
'HEADER_SEARCH_PATHS'
]
=
'$(inherited) '
+
XCConfigHelper
.
quote
(
library_header_search_paths
)
build_settings
[
'HEADER_SEARCH_PATHS'
]
=
XCConfigHelper
.
quote
(
library_header_search_paths
)
build_settings
[
'OTHER_CFLAGS'
]
+=
' '
+
XCConfigHelper
.
quote
(
library_header_search_paths
,
'-isystem'
)
end
build_settings
else
# Make headers discoverable from $PODS_ROOT/Headers directory
header_search_paths
=
target
.
sandbox
.
public_headers
.
search_paths
(
target
.
platform
)
swift_search_paths
=
pod_targets
.
select
(
&
:should_build?
).
select
(
&
:uses_swift?
).
map
(
&
:configuration_build_dir
)
{
'SWIFT_INCLUDE_PATHS'
=>
'$(inherited) '
+
XCConfigHelper
.
quote
(
swift_search_paths
),
# by `#import "…"`
'HEADER_SEARCH_PATHS'
=>
'$(inherited) '
+
XCConfigHelper
.
quote
(
header_search_paths
),
'HEADER_SEARCH_PATHS'
=>
XCConfigHelper
.
quote
(
header_search_paths
),
# by `#import <…>`
'OTHER_CFLAGS'
=>
'$(inherited) '
+
XCConfigHelper
.
quote
(
header_search_paths
,
'-isystem'
),
'OTHER_CFLAGS'
=>
XCConfigHelper
.
quote
(
header_search_paths
,
'-isystem'
),
}
end
end
...
...
lib/cocoapods/generator/xcconfig/pod_xcconfig.rb
View file @
396995c7
...
...
@@ -47,17 +47,18 @@ module Pod
config
=
{
'FRAMEWORK_SEARCH_PATHS'
=>
'$(inherited) '
,
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'$(inherited) COCOAPODS=1'
,
'HEADER_SEARCH_PATHS'
=>
XCConfigHelper
.
quote
(
target
.
header_search_paths
(
@test_xcconfig
)),
'HEADER_SEARCH_PATHS'
=>
'$(inherited) '
+
XCConfigHelper
.
quote
(
target
.
header_search_paths
(
@test_xcconfig
)),
'LIBRARY_SEARCH_PATHS'
=>
'$(inherited) '
,
'OTHER_CFLAGS'
=>
'$(inherited) '
,
'OTHER_LDFLAGS'
=>
XCConfigHelper
.
default_ld_flags
(
target
,
@test_xcconfig
),
'OTHER_SWIFT_FLAGS'
=>
'$(inherited) '
,
'PODS_ROOT'
=>
'${SRCROOT}'
,
'PODS_TARGET_SRCROOT'
=>
target
.
pod_target_srcroot
,
'PRODUCT_BUNDLE_IDENTIFIER'
=>
'org.cocoapods.${PRODUCT_NAME:rfc1034identifier}'
,
'PRODUCT_MODULE_NAME'
=>
target
.
product_module_name
,
'SKIP_INSTALL'
=>
'YES'
,
'SWIFT_ACTIVE_COMPILATION_CONDITIONS'
=>
'$(inherited) '
,
'SWIFT_INCLUDE_PATHS'
=>
'$(inherited) ${LIBRARY_SEARCH_PATHS}'
,
# 'USE_HEADERMAP' => 'NO'
'SWIFT_INCLUDE_PATHS'
=>
'$(inherited) '
,
}
@xcconfig
=
Xcodeproj
::
Config
.
new
(
config
)
...
...
spec/unit/generator/xcconfig/pod_xcconfig_spec.rb
View file @
396995c7
...
...
@@ -270,7 +270,7 @@ module Pod
@coconut_pod_target
.
dependent_targets
=
[
@banana_pod_target
]
generator
=
PodXCConfig
.
new
(
@coconut_pod_target
,
true
)
xcconfig
=
generator
.
generate
xcconfig
.
to_hash
[
'HEADER_SEARCH_PATHS'
].
should
==
'"${PODS_ROOT}/Headers/Private/CoconutLib"'
\
xcconfig
.
to_hash
[
'HEADER_SEARCH_PATHS'
].
should
==
'
$(inherited)
"${PODS_ROOT}/Headers/Private/CoconutLib"'
\
' "${PODS_ROOT}/Headers/Public/BananaLib" "${PODS_ROOT}/Headers/Public/BananaLib/BananaLib"'
\
' "${PODS_ROOT}/Headers/Public/CoconutLib" "${PODS_ROOT}/Headers/Public/CoconutLib/CoconutLib"'
\
' "${PODS_ROOT}/Headers/Public/monkey" "${PODS_ROOT}/Headers/Public/monkey/monkey"'
...
...
@@ -288,7 +288,7 @@ module Pod
# This is not an test xcconfig so it should exclude header search paths for the 'monkey' pod
generator
=
PodXCConfig
.
new
(
@coconut_pod_target
,
false
)
xcconfig
=
generator
.
generate
xcconfig
.
to_hash
[
'HEADER_SEARCH_PATHS'
].
should
==
'"${PODS_ROOT}/Headers/Private/CoconutLib"'
\
xcconfig
.
to_hash
[
'HEADER_SEARCH_PATHS'
].
should
==
'
$(inherited)
"${PODS_ROOT}/Headers/Private/CoconutLib"'
\
' "${PODS_ROOT}/Headers/Public/BananaLib" "${PODS_ROOT}/Headers/Public/BananaLib/BananaLib"'
\
' "${PODS_ROOT}/Headers/Public/CoconutLib" "${PODS_ROOT}/Headers/Public/CoconutLib/CoconutLib"'
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