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

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

Issue 1126193005: Check for inputs not generated by deps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@data
Patch Set: 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/scheduler.cc ('k') | tools/gn/setup.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_SETUP_H_ 5 #ifndef TOOLS_GN_SETUP_H_
6 #define TOOLS_GN_SETUP_H_ 6 #define TOOLS_GN_SETUP_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // Returns the file used to store the build arguments. Note that the path 61 // Returns the file used to store the build arguments. Note that the path
62 // might not exist. 62 // might not exist.
63 SourceFile GetBuildArgFile() const; 63 SourceFile GetBuildArgFile() const;
64 64
65 // Sets whether the build arguments should be filled during setup from the 65 // Sets whether the build arguments should be filled during setup from the
66 // command line/build argument file. This will be true by default. The use 66 // command line/build argument file. This will be true by default. The use
67 // case for setting it to false is when editing build arguments, we don't 67 // case for setting it to false is when editing build arguments, we don't
68 // want to rely on them being valid. 68 // want to rely on them being valid.
69 void set_fill_arguments(bool fa) { fill_arguments_ = fa; } 69 void set_fill_arguments(bool fa) { fill_arguments_ = fa; }
70 70
71 // When true (the default), Run() will check for unresolved dependencies and
72 // cycles upon completion. When false, such errors will be ignored.
73 void set_check_for_bad_items(bool s) { check_for_bad_items_ = s; }
74
75 // When true (the default), RunPostMessageLoop will check for overrides that
76 // were specified but not used. When false, such errors will be ignored.
77 void set_check_for_unused_overrides(bool s) {
78 check_for_unused_overrides_ = s;
79 }
80
81 // After a successful run, setting this will additionally cause the public 71 // After a successful run, setting this will additionally cause the public
82 // headers to be checked. Defaults to false. 72 // headers to be checked. Defaults to false.
83 void set_check_public_headers(bool s) { 73 void set_check_public_headers(bool s) {
84 check_public_headers_ = s; 74 check_public_headers_ = s;
85 } 75 }
86 76
87 // Read from the .gn file, these are the targets to check. If the .gn file 77 // Read from the .gn file, these are the targets to check. If the .gn file
88 // does not specify anything, this will be null. If the .gn file specifies 78 // does not specify anything, this will be null. If the .gn file specifies
89 // the empty list, this will be non-null but empty. 79 // the empty list, this will be non-null but empty.
90 const std::vector<LabelPattern>* check_patterns() const { 80 const std::vector<LabelPattern>* check_patterns() const {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 bool RunConfigFile(); 125 bool RunConfigFile();
136 126
137 bool FillOtherConfig(const base::CommandLine& cmdline); 127 bool FillOtherConfig(const base::CommandLine& cmdline);
138 128
139 BuildSettings build_settings_; 129 BuildSettings build_settings_;
140 scoped_refptr<LoaderImpl> loader_; 130 scoped_refptr<LoaderImpl> loader_;
141 scoped_refptr<Builder> builder_; 131 scoped_refptr<Builder> builder_;
142 132
143 SourceFile root_build_file_; 133 SourceFile root_build_file_;
144 134
145 bool check_for_bad_items_;
146 bool check_for_unused_overrides_;
147 bool check_public_headers_; 135 bool check_public_headers_;
148 136
149 // See getter for info. 137 // See getter for info.
150 scoped_ptr<std::vector<LabelPattern>> check_patterns_; 138 scoped_ptr<std::vector<LabelPattern>> check_patterns_;
151 139
152 Scheduler scheduler_; 140 Scheduler scheduler_;
153 141
154 // These settings and toolchain are used to interpret the command line and 142 // These settings and toolchain are used to interpret the command line and
155 // dot file. 143 // dot file.
156 Settings dotfile_settings_; 144 Settings dotfile_settings_;
(...skipping 13 matching lines...) Expand all
170 // this around for the entire run so that Values can blame to the command 158 // this around for the entire run so that Values can blame to the command
171 // line when we issue errors about them. 159 // line when we issue errors about them.
172 scoped_ptr<InputFile> args_input_file_; 160 scoped_ptr<InputFile> args_input_file_;
173 std::vector<Token> args_tokens_; 161 std::vector<Token> args_tokens_;
174 scoped_ptr<ParseNode> args_root_; 162 scoped_ptr<ParseNode> args_root_;
175 163
176 DISALLOW_COPY_AND_ASSIGN(Setup); 164 DISALLOW_COPY_AND_ASSIGN(Setup);
177 }; 165 };
178 166
179 #endif // TOOLS_GN_SETUP_H_ 167 #endif // TOOLS_GN_SETUP_H_
OLDNEW
« no previous file with comments | « tools/gn/scheduler.cc ('k') | tools/gn/setup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698