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

Side by Side Diff: tools/gn/xcode_object.cc

Issue 2623203004: Consolidate Xcode Project Setup (Closed)
Patch Set: Rebase Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « ios/build/tools/convert_gn_xcodeproj.py ('k') | tools/gn/xcode_writer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. 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 #include "tools/gn/xcode_object.h" 5 #include "tools/gn/xcode_object.h"
6 6
7 #include <iomanip> 7 #include <iomanip>
8 #include <sstream> 8 #include <sstream>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 668
669 targets_.push_back(base::MakeUnique<PBXAggregateTarget>( 669 targets_.push_back(base::MakeUnique<PBXAggregateTarget>(
670 name, shell_script, config_name_, attributes)); 670 name, shell_script, config_name_, attributes));
671 } 671 }
672 672
673 void PBXProject::AddIndexingTarget() { 673 void PBXProject::AddIndexingTarget() {
674 DCHECK(!target_for_indexing_); 674 DCHECK(!target_for_indexing_);
675 PBXAttributes attributes; 675 PBXAttributes attributes;
676 attributes["EXECUTABLE_PREFIX"] = ""; 676 attributes["EXECUTABLE_PREFIX"] = "";
677 attributes["HEADER_SEARCH_PATHS"] = sources_->path(); 677 attributes["HEADER_SEARCH_PATHS"] = sources_->path();
678 attributes["PRODUCT_NAME"] = name_; 678 attributes["PRODUCT_NAME"] = "sources";
679 679
680 PBXFileReference* product_reference = static_cast<PBXFileReference*>( 680 PBXFileReference* product_reference = static_cast<PBXFileReference*>(
681 products_->AddChild(base::MakeUnique<PBXFileReference>( 681 products_->AddChild(base::MakeUnique<PBXFileReference>(
682 std::string(), name_, "compiled.mach-o.executable"))); 682 std::string(), "sources", "compiled.mach-o.executable")));
683 683
684 const char product_type[] = "com.apple.product-type.tool"; 684 const char product_type[] = "com.apple.product-type.tool";
685 targets_.push_back(base::MakeUnique<PBXNativeTarget>( 685 targets_.push_back(base::MakeUnique<PBXNativeTarget>(
686 name_, std::string(), config_name_, attributes, product_type, name_, 686 "sources", std::string(), config_name_, attributes, product_type,
687 product_reference)); 687 "sources", product_reference));
688 target_for_indexing_ = static_cast<PBXNativeTarget*>(targets_.back().get()); 688 target_for_indexing_ = static_cast<PBXNativeTarget*>(targets_.back().get());
689 } 689 }
690 690
691 PBXNativeTarget* PBXProject::AddNativeTarget( 691 PBXNativeTarget* PBXProject::AddNativeTarget(
692 const std::string& name, 692 const std::string& name,
693 const std::string& type, 693 const std::string& type,
694 const std::string& output_name, 694 const std::string& output_name,
695 const std::string& output_type, 695 const std::string& output_type,
696 const std::string& shell_script, 696 const std::string& shell_script,
697 const PBXAttributes& extra_attributes) { 697 const PBXAttributes& extra_attributes) {
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 const std::string indent_str(indent, '\t'); 905 const std::string indent_str(indent, '\t');
906 const IndentRules rules = {false, indent + 1}; 906 const IndentRules rules = {false, indent + 1};
907 out << indent_str << Reference() << " = {\n"; 907 out << indent_str << Reference() << " = {\n";
908 PrintProperty(out, rules, "isa", ToString(Class())); 908 PrintProperty(out, rules, "isa", ToString(Class()));
909 PrintProperty(out, rules, "buildConfigurations", configurations_); 909 PrintProperty(out, rules, "buildConfigurations", configurations_);
910 PrintProperty(out, rules, "defaultConfigurationIsVisible", 1u); 910 PrintProperty(out, rules, "defaultConfigurationIsVisible", 1u);
911 PrintProperty(out, rules, "defaultConfigurationName", 911 PrintProperty(out, rules, "defaultConfigurationName",
912 configurations_[0]->Name()); 912 configurations_[0]->Name());
913 out << indent_str << "};\n"; 913 out << indent_str << "};\n";
914 } 914 }
OLDNEW
« no previous file with comments | « ios/build/tools/convert_gn_xcodeproj.py ('k') | tools/gn/xcode_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698