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

Unified Diff: tools/gn/target.h

Issue 1868023002: Add GN output prefix override and allow empty output extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: tools/gn/target.h
diff --git a/tools/gn/target.h b/tools/gn/target.h
index c3fed0122523b96d60805f00aa211bb5d2521d38..30ce39142482734475a991c45a090bd3840219b1 100644
--- a/tools/gn/target.h
+++ b/tools/gn/target.h
@@ -96,9 +96,23 @@ class Target : public Item {
// have been set before calling.
std::string GetComputedOutputName(bool include_prefix) const;
+ bool output_prefix_override() const { return output_prefix_override_; }
+ void set_output_prefix_override(bool prefix_override) {
+ output_prefix_override_ = prefix_override;
+ }
+
+ // 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
+ // extension) and the output extension is set but nonempty (use the given
+ // extension).
const std::string& output_extension() const { return output_extension_; }
void set_output_extension(const std::string& extension) {
output_extension_ = extension;
+ output_extension_set_ = true;
+ }
+ bool output_extension_set() const {
+ return output_extension_set_;
}
const FileList& sources() const { return sources_; }
@@ -318,7 +332,9 @@ class Target : public Item {
OutputType output_type_;
std::string output_name_;
+ bool output_prefix_override_;
std::string output_extension_;
+ bool output_extension_set_;
FileList sources_;
bool all_headers_public_;
« no previous file with comments | « tools/gn/substitution_writer_unittest.cc ('k') | tools/gn/target.cc » ('j') | tools/gn/target.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698