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 #include "tools/gn/commands.h" | 5 #include "tools/gn/commands.h" |
6 #include "tools/gn/filesystem_utils.h" | 6 #include "tools/gn/filesystem_utils.h" |
7 #include "tools/gn/item.h" | 7 #include "tools/gn/item.h" |
8 #include "tools/gn/label.h" | 8 #include "tools/gn/label.h" |
9 #include "tools/gn/label_pattern.h" | 9 #include "tools/gn/label_pattern.h" |
10 #include "tools/gn/setup.h" | 10 #include "tools/gn/setup.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 const CommandInfoMap& GetCommands() { | 30 const CommandInfoMap& GetCommands() { |
31 static CommandInfoMap info_map; | 31 static CommandInfoMap info_map; |
32 if (info_map.empty()) { | 32 if (info_map.empty()) { |
33 #define INSERT_COMMAND(cmd) \ | 33 #define INSERT_COMMAND(cmd) \ |
34 info_map[k##cmd] = CommandInfo(k##cmd##_HelpShort, \ | 34 info_map[k##cmd] = CommandInfo(k##cmd##_HelpShort, \ |
35 k##cmd##_Help, \ | 35 k##cmd##_Help, \ |
36 &Run##cmd); | 36 &Run##cmd); |
37 | 37 |
38 INSERT_COMMAND(Args) | 38 INSERT_COMMAND(Args) |
39 INSERT_COMMAND(Check) | 39 INSERT_COMMAND(Check) |
| 40 INSERT_COMMAND(Clean) |
40 INSERT_COMMAND(Desc) | 41 INSERT_COMMAND(Desc) |
41 INSERT_COMMAND(Gen) | 42 INSERT_COMMAND(Gen) |
42 INSERT_COMMAND(Format) | 43 INSERT_COMMAND(Format) |
43 INSERT_COMMAND(Help) | 44 INSERT_COMMAND(Help) |
44 INSERT_COMMAND(Ls) | 45 INSERT_COMMAND(Ls) |
45 INSERT_COMMAND(Refs) | 46 INSERT_COMMAND(Refs) |
46 | 47 |
47 #undef INSERT_COMMAND | 48 #undef INSERT_COMMAND |
48 } | 49 } |
49 return info_map; | 50 return info_map; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 } | 112 } |
112 | 113 |
113 std::vector<LabelPattern> pattern_vector; | 114 std::vector<LabelPattern> pattern_vector; |
114 pattern_vector.push_back(pattern); | 115 pattern_vector.push_back(pattern); |
115 FilterTargetsByPatterns(setup->builder()->GetAllResolvedTargets(), | 116 FilterTargetsByPatterns(setup->builder()->GetAllResolvedTargets(), |
116 pattern_vector, matches); | 117 pattern_vector, matches); |
117 return true; | 118 return true; |
118 } | 119 } |
119 | 120 |
120 } // namespace commands | 121 } // namespace commands |
OLD | NEW |