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

Unified Diff: tools/gn/target.h

Issue 1887533003: Add an output_dir override to GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: const Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/substitution_writer_unittest.cc ('k') | tools/gn/tool.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/target.h
diff --git a/tools/gn/target.h b/tools/gn/target.h
index fdd6f1a682164aeb758b4e707fbfd3aac705e807..ac159e104c2f825e776273a1d6e37e486c573363 100644
--- a/tools/gn/target.h
+++ b/tools/gn/target.h
@@ -100,6 +100,12 @@ class Target : public Item {
output_prefix_override_ = prefix_override;
}
+ // Desired output directory for the final output. This will be used for
+ // the {{output_dir}} substitution in the tool if it is specified. If
+ // is_null, the tool default will be used.
+ const SourceDir& output_dir() const { return output_dir_; }
+ void set_output_dir(const SourceDir& dir) { output_dir_ = dir; }
+
// The output extension is really a tri-state: unset (output_extension_set
// is false and the string is empty, meaning the default extension should be
// used), the output extension is set but empty (output should have no
@@ -332,6 +338,7 @@ class Target : public Item {
OutputType output_type_;
std::string output_name_;
bool output_prefix_override_;
+ SourceDir output_dir_;
std::string output_extension_;
bool output_extension_set_;
« no previous file with comments | « tools/gn/substitution_writer_unittest.cc ('k') | tools/gn/tool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698