OLD | NEW |
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 // | 93 // |
94 // Because this depends on the tool for this target, the toolchain must | 94 // Because this depends on the tool for this target, the toolchain must |
95 // have been set before calling. | 95 // have been set before calling. |
96 std::string GetComputedOutputName() const; | 96 std::string GetComputedOutputName() const; |
97 | 97 |
98 bool output_prefix_override() const { return output_prefix_override_; } | 98 bool output_prefix_override() const { return output_prefix_override_; } |
99 void set_output_prefix_override(bool prefix_override) { | 99 void set_output_prefix_override(bool prefix_override) { |
100 output_prefix_override_ = prefix_override; | 100 output_prefix_override_ = prefix_override; |
101 } | 101 } |
102 | 102 |
| 103 // Desired output directory for the final output. This will be used for |
| 104 // the {{output_dir}} substitution in the tool if it is specified. If |
| 105 // is_null, the tool default will be used. |
| 106 const SourceDir& output_dir() const { return output_dir_; } |
| 107 void set_output_dir(const SourceDir& dir) { output_dir_ = dir; } |
| 108 |
103 // The output extension is really a tri-state: unset (output_extension_set | 109 // The output extension is really a tri-state: unset (output_extension_set |
104 // is false and the string is empty, meaning the default extension should be | 110 // is false and the string is empty, meaning the default extension should be |
105 // used), the output extension is set but empty (output should have no | 111 // used), the output extension is set but empty (output should have no |
106 // extension) and the output extension is set but nonempty (use the given | 112 // extension) and the output extension is set but nonempty (use the given |
107 // extension). | 113 // extension). |
108 const std::string& output_extension() const { return output_extension_; } | 114 const std::string& output_extension() const { return output_extension_; } |
109 void set_output_extension(const std::string& extension) { | 115 void set_output_extension(const std::string& extension) { |
110 output_extension_ = extension; | 116 output_extension_ = extension; |
111 output_extension_set_ = true; | 117 output_extension_set_ = true; |
112 } | 118 } |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 bool CheckVisibility(Err* err) const; | 331 bool CheckVisibility(Err* err) const; |
326 bool CheckTestonly(Err* err) const; | 332 bool CheckTestonly(Err* err) const; |
327 bool CheckNoNestedStaticLibs(Err* err) const; | 333 bool CheckNoNestedStaticLibs(Err* err) const; |
328 bool CheckAssertNoDeps(Err* err) const; | 334 bool CheckAssertNoDeps(Err* err) const; |
329 void CheckSourcesGenerated() const; | 335 void CheckSourcesGenerated() const; |
330 void CheckSourceGenerated(const SourceFile& source) const; | 336 void CheckSourceGenerated(const SourceFile& source) const; |
331 | 337 |
332 OutputType output_type_; | 338 OutputType output_type_; |
333 std::string output_name_; | 339 std::string output_name_; |
334 bool output_prefix_override_; | 340 bool output_prefix_override_; |
| 341 SourceDir output_dir_; |
335 std::string output_extension_; | 342 std::string output_extension_; |
336 bool output_extension_set_; | 343 bool output_extension_set_; |
337 | 344 |
338 FileList sources_; | 345 FileList sources_; |
339 bool all_headers_public_; | 346 bool all_headers_public_; |
340 FileList public_headers_; | 347 FileList public_headers_; |
341 bool check_includes_; | 348 bool check_includes_; |
342 bool complete_static_lib_; | 349 bool complete_static_lib_; |
343 bool testonly_; | 350 bool testonly_; |
344 FileList inputs_; | 351 FileList inputs_; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 // Output files. Empty until the target is resolved. | 393 // Output files. Empty until the target is resolved. |
387 std::vector<OutputFile> computed_outputs_; | 394 std::vector<OutputFile> computed_outputs_; |
388 OutputFile link_output_file_; | 395 OutputFile link_output_file_; |
389 OutputFile dependency_output_file_; | 396 OutputFile dependency_output_file_; |
390 OutputFile runtime_link_output_file_; | 397 OutputFile runtime_link_output_file_; |
391 | 398 |
392 DISALLOW_COPY_AND_ASSIGN(Target); | 399 DISALLOW_COPY_AND_ASSIGN(Target); |
393 }; | 400 }; |
394 | 401 |
395 #endif // TOOLS_GN_TARGET_H_ | 402 #endif // TOOLS_GN_TARGET_H_ |
OLD | NEW |