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

Side by Side Diff: tools/gn/target.h

Issue 22290010: Add support for data deps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove switch Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « tools/gn/secondary/build/config/mac/BUILD.gn ('k') | tools/gn/target_generator.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #ifndef TOOLS_GN_TARGET_H_ 5 #ifndef TOOLS_GN_TARGET_H_
6 #define TOOLS_GN_TARGET_H_ 6 #define TOOLS_GN_TARGET_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 void set_output_type(OutputType t) { output_type_ = t; } 57 void set_output_type(OutputType t) { output_type_ = t; }
58 58
59 bool IsLinkable() const; 59 bool IsLinkable() const;
60 60
61 const FileList& sources() const { return sources_; } 61 const FileList& sources() const { return sources_; }
62 void swap_in_sources(FileList* s) { sources_.swap(*s); } 62 void swap_in_sources(FileList* s) { sources_.swap(*s); }
63 63
64 const FileList& data() const { return data_; } 64 const FileList& data() const { return data_; }
65 void swap_in_data(FileList* d) { data_.swap(*d); } 65 void swap_in_data(FileList* d) { data_.swap(*d); }
66 66
67 // Linked dependencies.
67 const std::vector<const Target*>& deps() const { return deps_; } 68 const std::vector<const Target*>& deps() const { return deps_; }
68 void swap_in_deps(std::vector<const Target*>* d) { deps_.swap(*d); } 69 void swap_in_deps(std::vector<const Target*>* d) { deps_.swap(*d); }
69 70
71 // Non-linked dependencies.
72 const std::vector<const Target*>& datadeps() const { return datadeps_; }
73 void swap_in_datadeps(std::vector<const Target*>* d) { datadeps_.swap(*d); }
74
70 // List of configs that this class inherits settings from. 75 // List of configs that this class inherits settings from.
71 const std::vector<const Config*>& configs() const { return configs_; } 76 const std::vector<const Config*>& configs() const { return configs_; }
72 void swap_in_configs(std::vector<const Config*>* c) { configs_.swap(*c); } 77 void swap_in_configs(std::vector<const Config*>* c) { configs_.swap(*c); }
73 78
74 // List of configs that all dependencies (direct and indirect) of this 79 // List of configs that all dependencies (direct and indirect) of this
75 // target get. These configs are not added to this target. 80 // target get. These configs are not added to this target.
76 const std::vector<const Config*>& all_dependent_configs() const { 81 const std::vector<const Config*>& all_dependent_configs() const {
77 return all_dependent_configs_; 82 return all_dependent_configs_;
78 } 83 }
79 void swap_in_all_dependent_configs(std::vector<const Config*>* c) { 84 void swap_in_all_dependent_configs(std::vector<const Config*>* c) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 const FileList& outputs() const { return outputs_; } 116 const FileList& outputs() const { return outputs_; }
112 void swap_in_outputs(FileList* s) { outputs_.swap(*s); } 117 void swap_in_outputs(FileList* s) { outputs_.swap(*s); }
113 118
114 private: 119 private:
115 const Settings* settings_; 120 const Settings* settings_;
116 OutputType output_type_; 121 OutputType output_type_;
117 122
118 FileList sources_; 123 FileList sources_;
119 FileList data_; 124 FileList data_;
120 std::vector<const Target*> deps_; 125 std::vector<const Target*> deps_;
126 std::vector<const Target*> datadeps_;
121 std::vector<const Config*> configs_; 127 std::vector<const Config*> configs_;
122 std::vector<const Config*> all_dependent_configs_; 128 std::vector<const Config*> all_dependent_configs_;
123 std::vector<const Config*> direct_dependent_configs_; 129 std::vector<const Config*> direct_dependent_configs_;
124 130
125 // Libraries from transitive deps. Libraries need to be linked only 131 // Libraries from transitive deps. Libraries need to be linked only
126 // with the end target (executable, shared library). These do not get 132 // with the end target (executable, shared library). These do not get
127 // pushed beyond shared library boundaries. 133 // pushed beyond shared library boundaries.
128 std::set<const Target*> inherited_libraries_; 134 std::set<const Target*> inherited_libraries_;
129 135
130 ConfigValues config_values_; 136 ConfigValues config_values_;
131 137
132 SourceDir destdir_; 138 SourceDir destdir_;
133 139
134 // Script target stuff. 140 // Script target stuff.
135 SourceFile script_; 141 SourceFile script_;
136 std::vector<std::string> script_args_; 142 std::vector<std::string> script_args_;
137 FileList outputs_; 143 FileList outputs_;
138 144
139 bool generated_; 145 bool generated_;
140 const Token* generator_function_; // Who generated this: for error messages. 146 const Token* generator_function_; // Who generated this: for error messages.
141 147
142 DISALLOW_COPY_AND_ASSIGN(Target); 148 DISALLOW_COPY_AND_ASSIGN(Target);
143 }; 149 };
144 150
145 #endif // TOOLS_GN_TARGET_H_ 151 #endif // TOOLS_GN_TARGET_H_
OLDNEW
« no previous file with comments | « tools/gn/secondary/build/config/mac/BUILD.gn ('k') | tools/gn/target_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698