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

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

Issue 1155303008: Allow directories for GN data lists. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@path
Patch Set: add dir test Created 5 years, 6 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 | « tools/gn/runtime_deps_unittest.cc ('k') | tools/gn/target_generator.cc » ('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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 complete_static_lib_ = complete; 113 complete_static_lib_ = complete;
114 } 114 }
115 115
116 bool testonly() const { return testonly_; } 116 bool testonly() const { return testonly_; }
117 void set_testonly(bool value) { testonly_ = value; } 117 void set_testonly(bool value) { testonly_ = value; }
118 118
119 // Compile-time extra dependencies. 119 // Compile-time extra dependencies.
120 const FileList& inputs() const { return inputs_; } 120 const FileList& inputs() const { return inputs_; }
121 FileList& inputs() { return inputs_; } 121 FileList& inputs() { return inputs_; }
122 122
123 // Runtime dependencies. 123 // Runtime dependencies. These are "file-like things" that can either be
124 const FileList& data() const { return data_; } 124 // directories or files. They do not need to exist, these are just passed as
125 FileList& data() { return data_; } 125 // runtime dependencies to external test systems as necessary.
126 const std::vector<std::string>& data() const { return data_; }
127 std::vector<std::string>& data() { return data_; }
126 128
127 // Returns true if targets depending on this one should have an order 129 // Returns true if targets depending on this one should have an order
128 // dependency. 130 // dependency.
129 bool hard_dep() const { 131 bool hard_dep() const {
130 return output_type_ == ACTION || 132 return output_type_ == ACTION ||
131 output_type_ == ACTION_FOREACH || 133 output_type_ == ACTION_FOREACH ||
132 output_type_ == COPY_FILES; 134 output_type_ == COPY_FILES;
133 } 135 }
134 136
135 // Returns the iterator range which can be used in range-based for loops 137 // Returns the iterator range which can be used in range-based for loops
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 std::string output_name_; 265 std::string output_name_;
264 std::string output_extension_; 266 std::string output_extension_;
265 267
266 FileList sources_; 268 FileList sources_;
267 bool all_headers_public_; 269 bool all_headers_public_;
268 FileList public_headers_; 270 FileList public_headers_;
269 bool check_includes_; 271 bool check_includes_;
270 bool complete_static_lib_; 272 bool complete_static_lib_;
271 bool testonly_; 273 bool testonly_;
272 FileList inputs_; 274 FileList inputs_;
273 FileList data_; 275 std::vector<std::string> data_;
274 276
275 LabelTargetVector private_deps_; 277 LabelTargetVector private_deps_;
276 LabelTargetVector public_deps_; 278 LabelTargetVector public_deps_;
277 LabelTargetVector data_deps_; 279 LabelTargetVector data_deps_;
278 280
279 UniqueVector<LabelConfigPair> configs_; 281 UniqueVector<LabelConfigPair> configs_;
280 UniqueVector<LabelConfigPair> all_dependent_configs_; 282 UniqueVector<LabelConfigPair> all_dependent_configs_;
281 UniqueVector<LabelConfigPair> public_configs_; 283 UniqueVector<LabelConfigPair> public_configs_;
282 UniqueVector<LabelTargetPair> forward_dependent_configs_; 284 UniqueVector<LabelTargetPair> forward_dependent_configs_;
283 285
(...skipping 19 matching lines...) Expand all
303 const Toolchain* toolchain_; 305 const Toolchain* toolchain_;
304 306
305 // Output files. Null until the target is resolved. 307 // Output files. Null until the target is resolved.
306 OutputFile link_output_file_; 308 OutputFile link_output_file_;
307 OutputFile dependency_output_file_; 309 OutputFile dependency_output_file_;
308 310
309 DISALLOW_COPY_AND_ASSIGN(Target); 311 DISALLOW_COPY_AND_ASSIGN(Target);
310 }; 312 };
311 313
312 #endif // TOOLS_GN_TARGET_H_ 314 #endif // TOOLS_GN_TARGET_H_
OLDNEW
« no previous file with comments | « tools/gn/runtime_deps_unittest.cc ('k') | tools/gn/target_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698