Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Unified Diff: pylib/gyp/generator/xcode.py

Issue 51413002: Adds generator support for Xcode 5 xctest targets. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: add copyright boilerplate Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pylib/gyp/xcodeproj_file.py » ('j') | test/mac/gyptest-xctest.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/generator/xcode.py
diff --git a/pylib/gyp/generator/xcode.py b/pylib/gyp/generator/xcode.py
index 7e5f79f1704871eab663fd7c877ea838a3f8cab4..ccf91e3ce4b183e71510680f2788132f0ca8fc2a 100644
--- a/pylib/gyp/generator/xcode.py
+++ b/pylib/gyp/generator/xcode.py
@@ -73,6 +73,7 @@ generator_additional_non_configuration_keys = [
'mac_framework_headers',
'mac_framework_private_headers',
'xcode_create_dependents_test_runner',
+ 'xctest_bundle',
]
# We want to let any rules apply to files that are resources also.
@@ -642,6 +643,7 @@ def GenerateOutput(target_list, target_dicts, data, params):
'static_library': 'com.apple.product-type.library.static',
'executable+bundle': 'com.apple.product-type.application',
'loadable_module+bundle': 'com.apple.product-type.bundle',
+ 'loadable_module+xctest': 'com.apple.product-type.bundle.unit-test',
'shared_library+bundle': 'com.apple.product-type.framework',
}
@@ -652,10 +654,17 @@ def GenerateOutput(target_list, target_dicts, data, params):
type = spec['type']
is_bundle = int(spec.get('mac_bundle', 0))
Mark Mentovai 2013/10/30 21:31:16 The name mac_bundle was chosen because platform-sp
jonwall 2013/10/30 22:03:15 Done.
+ is_xctest = int(spec.get('xctest_bundle', 0))
if type != 'none':
type_bundle_key = type
- if is_bundle:
+ if is_xctest:
+ type_bundle_key += '+xctest'
+ assert type == 'loadable_module', (
+ 'xctest_bundle targets must have type loadable_module (target %s)' %
+ target_name)
+ elif is_bundle:
type_bundle_key += '+bundle'
+
xctarget_type = gyp.xcodeproj_file.PBXNativeTarget
try:
target_properties['productType'] = _types[type_bundle_key]
@@ -668,6 +677,9 @@ def GenerateOutput(target_list, target_dicts, data, params):
assert not is_bundle, (
'mac_bundle targets cannot have type none (target "%s")' %
target_name)
+ assert not is_xctest, (
+ 'xctest_bundle targets cannot have type none (target "%s")' %
+ target_name)
target_product_name = spec.get('product_name')
if target_product_name is not None:
« no previous file with comments | « no previous file | pylib/gyp/xcodeproj_file.py » ('j') | test/mac/gyptest-xctest.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698