| OLD | NEW |
| 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 #include "tools/gn/switches.h" | 5 #include "tools/gn/switches.h" |
| 6 | 6 |
| 7 namespace switches { | 7 namespace switches { |
| 8 | 8 |
| 9 const char kArgs[] = "args"; | 9 const char kArgs[] = "args"; |
| 10 const char kArgs_HelpShort[] = | 10 const char kArgs_HelpShort[] = |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 const char kDotfile_Help[] = | 62 const char kDotfile_Help[] = |
| 63 "--dotfile: override the name of the \".gn\" file.\n" | 63 "--dotfile: override the name of the \".gn\" file.\n" |
| 64 "\n" | 64 "\n" |
| 65 " Normally GN loads the \".gn\"file from the source root for some basic\n" | 65 " Normally GN loads the \".gn\"file from the source root for some basic\n" |
| 66 " configuration (see \"gn help dotfile\"). This flag allows you to\n" | 66 " configuration (see \"gn help dotfile\"). This flag allows you to\n" |
| 67 " use a different file.\n" | 67 " use a different file.\n" |
| 68 "\n" | 68 "\n" |
| 69 " Note that this interacts with \"--root\" in a possibly incorrect way.\n" | 69 " Note that this interacts with \"--root\" in a possibly incorrect way.\n" |
| 70 " It would be nice to test the edge cases and document or fix.\n"; | 70 " It would be nice to test the edge cases and document or fix.\n"; |
| 71 | 71 |
| 72 const char kMarkdown[] = "markdown"; |
| 73 const char kMarkdown_HelpShort[] = |
| 74 "--markdown: write the output in the Markdown format."; |
| 75 const char kMarkdown_Help[] = |
| 76 "--markdown: write the output in the Markdown format.\n"; |
| 77 |
| 72 const char kNoColor[] = "nocolor"; | 78 const char kNoColor[] = "nocolor"; |
| 73 const char kNoColor_HelpShort[] = | 79 const char kNoColor_HelpShort[] = |
| 74 "--nocolor: Force non-colored output."; | 80 "--nocolor: Force non-colored output."; |
| 75 const char kNoColor_Help[] = COLOR_HELP_LONG; | 81 const char kNoColor_Help[] = COLOR_HELP_LONG; |
| 76 | 82 |
| 77 const char kQuiet[] = "q"; | 83 const char kQuiet[] = "q"; |
| 78 const char kQuiet_HelpShort[] = | 84 const char kQuiet_HelpShort[] = |
| 79 "-q: Quiet mode. Don't print output on success."; | 85 "-q: Quiet mode. Don't print output on success."; |
| 80 const char kQuiet_Help[] = | 86 const char kQuiet_Help[] = |
| 81 "-q: Quiet mode. Don't print output on success.\n" | 87 "-q: Quiet mode. Don't print output on success.\n" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 | 183 |
| 178 #define INSERT_VARIABLE(var) \ | 184 #define INSERT_VARIABLE(var) \ |
| 179 info_map[k##var] = SwitchInfo(k##var##_HelpShort, k##var##_Help); | 185 info_map[k##var] = SwitchInfo(k##var##_HelpShort, k##var##_Help); |
| 180 | 186 |
| 181 const SwitchInfoMap& GetSwitches() { | 187 const SwitchInfoMap& GetSwitches() { |
| 182 static SwitchInfoMap info_map; | 188 static SwitchInfoMap info_map; |
| 183 if (info_map.empty()) { | 189 if (info_map.empty()) { |
| 184 INSERT_VARIABLE(Args) | 190 INSERT_VARIABLE(Args) |
| 185 INSERT_VARIABLE(Color) | 191 INSERT_VARIABLE(Color) |
| 186 INSERT_VARIABLE(Dotfile) | 192 INSERT_VARIABLE(Dotfile) |
| 193 INSERT_VARIABLE(Markdown) |
| 187 INSERT_VARIABLE(NoColor) | 194 INSERT_VARIABLE(NoColor) |
| 188 INSERT_VARIABLE(Root) | 195 INSERT_VARIABLE(Root) |
| 189 INSERT_VARIABLE(Quiet) | 196 INSERT_VARIABLE(Quiet) |
| 190 INSERT_VARIABLE(Time) | 197 INSERT_VARIABLE(Time) |
| 191 INSERT_VARIABLE(Tracelog) | 198 INSERT_VARIABLE(Tracelog) |
| 192 INSERT_VARIABLE(Verbose) | 199 INSERT_VARIABLE(Verbose) |
| 193 INSERT_VARIABLE(Version) | 200 INSERT_VARIABLE(Version) |
| 194 } | 201 } |
| 195 return info_map; | 202 return info_map; |
| 196 } | 203 } |
| 197 | 204 |
| 198 #undef INSERT_VARIABLE | 205 #undef INSERT_VARIABLE |
| 199 | 206 |
| 200 } // namespace switches | 207 } // namespace switches |
| OLD | NEW |