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

Side by Side Diff: tools/gn/tool.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 unified diff | Download patch
« no previous file with comments | « tools/gn/target.h ('k') | tools/gn/variables.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_TOOL_H_ 5 #ifndef TOOLS_GN_TOOL_H_
6 #define TOOLS_GN_TOOL_H_ 6 #define TOOLS_GN_TOOL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // Should include a leading "." if nonempty. 45 // Should include a leading "." if nonempty.
46 const std::string& default_output_extension() const { 46 const std::string& default_output_extension() const {
47 return default_output_extension_; 47 return default_output_extension_;
48 } 48 }
49 void set_default_output_extension(const std::string& ext) { 49 void set_default_output_extension(const std::string& ext) {
50 DCHECK(!complete_); 50 DCHECK(!complete_);
51 DCHECK(ext.empty() || ext[0] == '.'); 51 DCHECK(ext.empty() || ext[0] == '.');
52 default_output_extension_ = ext; 52 default_output_extension_ = ext;
53 } 53 }
54 54
55 const SubstitutionPattern& default_output_dir() const {
56 return default_output_dir_;
57 }
58 void set_default_output_dir(const SubstitutionPattern& dir) {
59 DCHECK(!complete_);
60 default_output_dir_ = dir;
61 }
62
55 // Dependency file (if supported). 63 // Dependency file (if supported).
56 const SubstitutionPattern& depfile() const { 64 const SubstitutionPattern& depfile() const {
57 return depfile_; 65 return depfile_;
58 } 66 }
59 void set_depfile(const SubstitutionPattern& df) { 67 void set_depfile(const SubstitutionPattern& df) {
60 DCHECK(!complete_); 68 DCHECK(!complete_);
61 depfile_ = df; 69 depfile_ = df;
62 } 70 }
63 71
64 DepsFormat depsformat() const { 72 DepsFormat depsformat() const {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 187
180 // Substitutions required by this tool. 188 // Substitutions required by this tool.
181 const SubstitutionBits& substitution_bits() const { 189 const SubstitutionBits& substitution_bits() const {
182 DCHECK(complete_); 190 DCHECK(complete_);
183 return substitution_bits_; 191 return substitution_bits_;
184 } 192 }
185 193
186 private: 194 private:
187 SubstitutionPattern command_; 195 SubstitutionPattern command_;
188 std::string default_output_extension_; 196 std::string default_output_extension_;
197 SubstitutionPattern default_output_dir_;
189 SubstitutionPattern depfile_; 198 SubstitutionPattern depfile_;
190 DepsFormat depsformat_; 199 DepsFormat depsformat_;
191 PrecompiledHeaderType precompiled_header_type_; 200 PrecompiledHeaderType precompiled_header_type_;
192 SubstitutionPattern description_; 201 SubstitutionPattern description_;
193 std::string lib_switch_; 202 std::string lib_switch_;
194 std::string lib_dir_switch_; 203 std::string lib_dir_switch_;
195 SubstitutionList outputs_; 204 SubstitutionList outputs_;
196 SubstitutionPattern link_output_; 205 SubstitutionPattern link_output_;
197 SubstitutionPattern depend_output_; 206 SubstitutionPattern depend_output_;
198 SubstitutionPattern runtime_link_output_; 207 SubstitutionPattern runtime_link_output_;
199 std::string output_prefix_; 208 std::string output_prefix_;
200 bool restat_; 209 bool restat_;
201 SubstitutionPattern rspfile_; 210 SubstitutionPattern rspfile_;
202 SubstitutionPattern rspfile_content_; 211 SubstitutionPattern rspfile_content_;
203 212
204 bool complete_; 213 bool complete_;
205 214
206 SubstitutionBits substitution_bits_; 215 SubstitutionBits substitution_bits_;
207 216
208 DISALLOW_COPY_AND_ASSIGN(Tool); 217 DISALLOW_COPY_AND_ASSIGN(Tool);
209 }; 218 };
210 219
211 #endif // TOOLS_GN_TOOL_H_ 220 #endif // TOOLS_GN_TOOL_H_
OLDNEW
« no previous file with comments | « tools/gn/target.h ('k') | tools/gn/variables.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698