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/setup.h" | 9 #include "tools/gn/setup.h" |
10 #include "tools/gn/standard_out.h" | 10 #include "tools/gn/standard_out.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 const CommandInfoMap& GetCommands() { | 29 const CommandInfoMap& GetCommands() { |
30 static CommandInfoMap info_map; | 30 static CommandInfoMap info_map; |
31 if (info_map.empty()) { | 31 if (info_map.empty()) { |
32 #define INSERT_COMMAND(cmd) \ | 32 #define INSERT_COMMAND(cmd) \ |
33 info_map[k##cmd] = CommandInfo(k##cmd##_HelpShort, \ | 33 info_map[k##cmd] = CommandInfo(k##cmd##_HelpShort, \ |
34 k##cmd##_Help, \ | 34 k##cmd##_Help, \ |
35 &Run##cmd); | 35 &Run##cmd); |
36 | 36 |
37 INSERT_COMMAND(Args) | 37 INSERT_COMMAND(Args) |
| 38 INSERT_COMMAND(Check) |
38 INSERT_COMMAND(Desc) | 39 INSERT_COMMAND(Desc) |
39 INSERT_COMMAND(Gen) | 40 INSERT_COMMAND(Gen) |
40 INSERT_COMMAND(Help) | 41 INSERT_COMMAND(Help) |
41 INSERT_COMMAND(Refs) | 42 INSERT_COMMAND(Refs) |
42 | 43 |
43 #undef INSERT_COMMAND | 44 #undef INSERT_COMMAND |
44 } | 45 } |
45 return info_map; | 46 return info_map; |
46 } | 47 } |
47 | 48 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 "The \"" + label.GetUserVisibleName(false) + "\" thing\n" | 83 "The \"" + label.GetUserVisibleName(false) + "\" thing\n" |
83 "is not a target. Somebody should probably implement this command for " | 84 "is not a target. Somebody should probably implement this command for " |
84 "other\nitem types."); | 85 "other\nitem types."); |
85 return NULL; | 86 return NULL; |
86 } | 87 } |
87 | 88 |
88 return target; | 89 return target; |
89 } | 90 } |
90 | 91 |
91 } // namespace commands | 92 } // namespace commands |
OLD | NEW |