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_COMMANDS_H_ | 5 #ifndef TOOLS_GN_COMMANDS_H_ |
6 #define TOOLS_GN_COMMANDS_H_ | 6 #define TOOLS_GN_COMMANDS_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 bool force_check); | 133 bool force_check); |
134 | 134 |
135 // Filters the given list of targets by the given pattern list. | 135 // Filters the given list of targets by the given pattern list. |
136 void FilterTargetsByPatterns(const std::vector<const Target*>& input, | 136 void FilterTargetsByPatterns(const std::vector<const Target*>& input, |
137 const std::vector<LabelPattern>& filter, | 137 const std::vector<LabelPattern>& filter, |
138 std::vector<const Target*>* output); | 138 std::vector<const Target*>* output); |
139 void FilterTargetsByPatterns(const std::vector<const Target*>& input, | 139 void FilterTargetsByPatterns(const std::vector<const Target*>& input, |
140 const std::vector<LabelPattern>& filter, | 140 const std::vector<LabelPattern>& filter, |
141 UniqueVector<const Target*>* output); | 141 UniqueVector<const Target*>* output); |
142 | 142 |
| 143 // Builds a list of pattern from a semicolon-separated list of labels. |
| 144 bool FilterPatternsFromString(const BuildSettings* build_settings, |
| 145 const std::string& label_list_string, |
| 146 std::vector<LabelPattern>* filters, |
| 147 Err* err); |
| 148 |
143 // These are the documentation strings for the command-line flags used by | 149 // These are the documentation strings for the command-line flags used by |
144 // FilterAndPrintTargets. Commands that call that function should incorporate | 150 // FilterAndPrintTargets. Commands that call that function should incorporate |
145 // these into their help. | 151 // these into their help. |
146 #define TARGET_PRINTING_MODE_COMMAND_LINE_HELP \ | 152 #define TARGET_PRINTING_MODE_COMMAND_LINE_HELP \ |
147 " --as=(buildfile|label|output)\n"\ | 153 " --as=(buildfile|label|output)\n"\ |
148 " How to print targets.\n"\ | 154 " How to print targets.\n"\ |
149 "\n"\ | 155 "\n"\ |
150 " buildfile\n"\ | 156 " buildfile\n"\ |
151 " Prints the build files where the given target was declared as\n"\ | 157 " Prints the build files where the given target was declared as\n"\ |
152 " file names.\n"\ | 158 " file names.\n"\ |
(...skipping 22 matching lines...) Expand all Loading... |
175 void FilterAndPrintTargets(bool indent, std::vector<const Target*>* targets); | 181 void FilterAndPrintTargets(bool indent, std::vector<const Target*>* targets); |
176 void FilterAndPrintTargetSet(bool indent, | 182 void FilterAndPrintTargetSet(bool indent, |
177 const std::set<const Target*>& targets); | 183 const std::set<const Target*>& targets); |
178 | 184 |
179 // Extra help from command_check.cc | 185 // Extra help from command_check.cc |
180 extern const char kNoGnCheck_Help[]; | 186 extern const char kNoGnCheck_Help[]; |
181 | 187 |
182 } // namespace commands | 188 } // namespace commands |
183 | 189 |
184 #endif // TOOLS_GN_COMMANDS_H_ | 190 #endif // TOOLS_GN_COMMANDS_H_ |
OLD | NEW |