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
d4595215
Commit
d4595215
authored
May 10, 2015
by
Marius Rackwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Target] Implement #configuration_build_dir in the concrete subclasses
parent
55aa2f01
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
20 deletions
+33
-20
aggregate_xcconfig.rb
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
+1
-1
target.rb
lib/cocoapods/target.rb
+0
-17
aggregate_target.rb
lib/cocoapods/target/aggregate_target.rb
+7
-0
pod_target.rb
lib/cocoapods/target/pod_target.rb
+22
-0
aggregate_target_spec.rb
spec/unit/target/aggregate_target_spec.rb
+1
-1
pod_target_spec.rb
spec/unit/target/pod_target_spec.rb
+2
-1
No files found.
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
View file @
d4595215
...
...
@@ -65,7 +65,7 @@ module Pod
end
end
build_settings
=
{
'PODS_FRAMEWORK_BUILD_PATH'
=>
target
.
configuration_build_dir
,
'PODS_FRAMEWORK_BUILD_PATH'
=>
target
.
scoped_
configuration_build_dir
,
# Make headers discoverable by `import "…"`
'OTHER_CFLAGS'
=>
'$(inherited) '
+
XCConfigHelper
.
quote
(
header_search_paths
,
'-iquote'
),
}
...
...
lib/cocoapods/target.rb
View file @
d4595215
...
...
@@ -180,23 +180,6 @@ module Pod
support_files_dir
+
"
#{
label
}
-dummy.m"
end
# @return [String] The configuration build dir, if the target is integrated
# as framework.
#
# @note Namespace the pod target product with its target definition name.
# Pod target products are named after their specs. The namespacing
# cannot directly happen in the product name itself, because this
# must be equal to the module name and this will be used in source
# code, which should stay agnostic over the dependency manager.
# We need namespacing at all because multiple targets can exist for
# the same podspec and their products should not collide. This
# happens when multiple user targets require the same pod, because
# they could require different sets of subspecs.
#
def
configuration_build_dir
"$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/
#{
target_definition
.
label
}
"
end
#-------------------------------------------------------------------------#
private
...
...
lib/cocoapods/target/aggregate_target.rb
View file @
d4595215
...
...
@@ -198,6 +198,13 @@ module Pod
"${SRCROOT}/
#{
relative_to_srcroot
(
embed_frameworks_script_path
)
}
"
end
# @return [String] The scoped configuration build dir, relevant if the
# target is integrated as framework.
#
def
scoped_configuration_build_dir
"$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/
#{
target_definition
.
label
}
"
end
private
# @!group Private Helpers
...
...
lib/cocoapods/target/pod_target.rb
View file @
d4595215
...
...
@@ -19,6 +19,17 @@ module Pod
# @return [Bool] whether the target needs to be scoped by target definition,
# because the spec is used with different subspec sets across them.
#
# @note For frameworks the target products of {PodTarget}s are named
# after their specs. The namespacing cannot directly happen in
# the product name itself, because this must be equal to the module
# name and this will be used in source code, which should stay
# agnostic over the dependency manager.
# We need namespacing because multiple targets can exist for the
# same podspec and their products should not collide. This
# duplication is needed when multiple user targets have the same
# dependency, but they require different sets of subspecs or they
# are on different platforms.
#
attr_accessor
:scoped
alias_method
:scoped?
,
:scoped
...
...
@@ -189,6 +200,17 @@ module Pod
end
end
# @return [String] The configuration build dir, relevant if the target is
# integrated as framework.
#
def
configuration_build_dir
if
scoped?
"$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/
#{
target_definitions
.
first
.
label
}
"
else
'$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)'
end
end
private
# @param [TargetDefinition] target_definition
...
...
spec/unit/target/aggregate_target_spec.rb
View file @
d4595215
...
...
@@ -80,7 +80,7 @@ module Pod
end
it
'returns the path for the CONFIGURATION_BUILD_DIR build setting'
do
@target
.
configuration_build_dir
.
should
==
'$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods'
@target
.
scoped_
configuration_build_dir
.
should
==
'$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods'
end
end
...
...
spec/unit/target/pod_target_spec.rb
View file @
d4595215
...
...
@@ -161,7 +161,8 @@ module Pod
end
it
'returns the path for the CONFIGURATION_BUILD_DIR build setting'
do
@pod_target
.
configuration_build_dir
.
should
==
'$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods'
@pod_target
.
configuration_build_dir
.
should
==
'$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)'
@pod_target
.
scoped
.
configuration_build_dir
.
should
==
'$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods'
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