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

Side by Side Diff: pylib/gyp/generator/xcode.py

Issue 1423583004: Revert of e2e928bacd07fead99a18cb08d64cb24e131d3e5 (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 Google Inc. All rights reserved. 1 # Copyright (c) 2012 Google Inc. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import filecmp 5 import filecmp
6 import gyp.common 6 import gyp.common
7 import gyp.xcodeproj_file 7 import gyp.xcodeproj_file
8 import gyp.xcode_ninja 8 import gyp.xcode_ninja
9 import errno 9 import errno
10 import os 10 import os
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 ninja_wrapper = params.get('flavor') == 'ninja' 583 ninja_wrapper = params.get('flavor') == 'ninja'
584 if ninja_wrapper: 584 if ninja_wrapper:
585 (target_list, target_dicts, data) = \ 585 (target_list, target_dicts, data) = \
586 gyp.xcode_ninja.CreateWrapper(target_list, target_dicts, data, params) 586 gyp.xcode_ninja.CreateWrapper(target_list, target_dicts, data, params)
587 587
588 options = params['options'] 588 options = params['options']
589 generator_flags = params.get('generator_flags', {}) 589 generator_flags = params.get('generator_flags', {})
590 parallel_builds = generator_flags.get('xcode_parallel_builds', True) 590 parallel_builds = generator_flags.get('xcode_parallel_builds', True)
591 serialize_all_tests = \ 591 serialize_all_tests = \
592 generator_flags.get('xcode_serialize_all_test_runs', True) 592 generator_flags.get('xcode_serialize_all_test_runs', True)
593 project_version = generator_flags.get('xcode_project_version', None)
594 upgrade_check_project_version = \
595 generator_flags.get('xcode_upgrade_check_project_version', None)
596
597 # Format upgrade_check_project_version with leading zeros as needed.
598 if upgrade_check_project_version:
599 upgrade_check_project_version = str(upgrade_check_project_version)
600 while len(upgrade_check_project_version) < 4:
601 upgrade_check_project_version = '0' + upgrade_check_project_version
602
603 skip_excluded_files = \ 593 skip_excluded_files = \
604 not generator_flags.get('xcode_list_excluded_files', True) 594 not generator_flags.get('xcode_list_excluded_files', True)
605 xcode_projects = {} 595 xcode_projects = {}
606 for build_file, build_file_dict in data.iteritems(): 596 for build_file, build_file_dict in data.iteritems():
607 (build_file_root, build_file_ext) = os.path.splitext(build_file) 597 (build_file_root, build_file_ext) = os.path.splitext(build_file)
608 if build_file_ext != '.gyp': 598 if build_file_ext != '.gyp':
609 continue 599 continue
610 xcodeproj_path = build_file_root + options.suffix + '.xcodeproj' 600 xcodeproj_path = build_file_root + options.suffix + '.xcodeproj'
611 if options.generator_output: 601 if options.generator_output:
612 xcodeproj_path = os.path.join(options.generator_output, xcodeproj_path) 602 xcodeproj_path = os.path.join(options.generator_output, xcodeproj_path)
613 xcp = XcodeProject(build_file, xcodeproj_path, build_file_dict) 603 xcp = XcodeProject(build_file, xcodeproj_path, build_file_dict)
614 xcode_projects[build_file] = xcp 604 xcode_projects[build_file] = xcp
615 pbxp = xcp.project 605 pbxp = xcp.project
616 606
617 # Set project-level attributes from multiple options
618 project_attributes = {};
619 if parallel_builds: 607 if parallel_builds:
620 project_attributes['BuildIndependentTargetsInParallel'] = 'YES' 608 pbxp.SetProperty('attributes',
621 if upgrade_check_project_version: 609 {'BuildIndependentTargetsInParallel': 'YES'})
622 project_attributes['LastUpgradeCheck'] = upgrade_check_project_version
623 project_attributes['LastTestingUpgradeCheck'] = \
624 upgrade_check_project_version
625 project_attributes['LastSwiftUpdateCheck'] = \
626 upgrade_check_project_version
627 pbxp.SetProperty('attributes', project_attributes)
628
629 if project_version:
630 xcp.project_file.SetXcodeVersion(project_version)
631 610
632 # Add gyp/gypi files to project 611 # Add gyp/gypi files to project
633 if not generator_flags.get('standalone'): 612 if not generator_flags.get('standalone'):
634 main_group = pbxp.GetProperty('mainGroup') 613 main_group = pbxp.GetProperty('mainGroup')
635 build_group = gyp.xcodeproj_file.PBXGroup({'name': 'Build'}) 614 build_group = gyp.xcodeproj_file.PBXGroup({'name': 'Build'})
636 main_group.AppendChild(build_group) 615 main_group.AppendChild(build_group)
637 for included_file in build_file_dict['included_files']: 616 for included_file in build_file_dict['included_files']:
638 build_group.AddOrGetFileByPath(included_file, False) 617 build_group.AddOrGetFileByPath(included_file, False)
639 618
640 xcode_targets = {} 619 xcode_targets = {}
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 1252
1274 for build_file in build_files: 1253 for build_file in build_files:
1275 xcode_projects[build_file].Finalize1(xcode_targets, serialize_all_tests) 1254 xcode_projects[build_file].Finalize1(xcode_targets, serialize_all_tests)
1276 1255
1277 for build_file in build_files: 1256 for build_file in build_files:
1278 xcode_projects[build_file].Finalize2(xcode_targets, 1257 xcode_projects[build_file].Finalize2(xcode_targets,
1279 xcode_target_to_target_dict) 1258 xcode_target_to_target_dict)
1280 1259
1281 for build_file in build_files: 1260 for build_file in build_files:
1282 xcode_projects[build_file].Write() 1261 xcode_projects[build_file].Write()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698