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

Unified Diff: tools/gn/command_args.cc

Issue 2481423002: Convert gn docstrings to C++11 raw strings. (Closed)
Patch Set: Fixes Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/command_analyze.cc ('k') | tools/gn/command_check.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/command_args.cc
diff --git a/tools/gn/command_args.cc b/tools/gn/command_args.cc
index 3b3dde627a006924b02ec0529d7474e8d4ee22a2..374a274a73919d3ad2599b9515d96e184512a826 100644
--- a/tools/gn/command_args.cc
+++ b/tools/gn/command_args.cc
@@ -280,62 +280,63 @@ extern const char kArgs[] = "args";
extern const char kArgs_HelpShort[] =
"args: Display or configure arguments declared by the build.";
extern const char kArgs_Help[] =
- "gn args <out_dir> [--list] [--short] [--args]\n"
- "\n"
- " See also \"gn help buildargs\" for a more high-level overview of how\n"
- " build arguments work.\n"
- "\n"
- "Usage\n"
- " gn args <out_dir>\n"
- " Open the arguments for the given build directory in an editor\n"
- " (as specified by the EDITOR environment variable). If the given\n"
- " build directory doesn't exist, it will be created and an empty\n"
- " args file will be opened in the editor. You would type something\n"
- " like this into that file:\n"
- " enable_doom_melon=false\n"
- " os=\"android\"\n"
- "\n"
- " Note: you can edit the build args manually by editing the file\n"
- " \"args.gn\" in the build directory and then running\n"
- " \"gn gen <out_dir>\".\n"
- "\n"
- " gn args <out_dir> --list[=<exact_arg>] [--short]\n"
- " Lists all build arguments available in the current configuration,\n"
- " or, if an exact_arg is specified for the list flag, just that one\n"
- " build argument.\n"
- "\n"
- " The output will list the declaration location, default value, and\n"
- " comment preceeding the declaration. If --short is specified,\n"
- " only the names and values will be printed.\n"
- "\n"
- " If the out_dir is specified, the build configuration will be\n"
- " taken from that build directory. The reason this is needed is that\n"
- " the definition of some arguments is dependent on the build\n"
- " configuration, so setting some values might add, remove, or change\n"
- " the default values for other arguments. Specifying your exact\n"
- " configuration allows the proper arguments to be displayed.\n"
- "\n"
- " Instead of specifying the out_dir, you can also use the\n"
- " command-line flag to specify the build configuration:\n"
- " --args=<exact list of args to use>\n"
- "\n"
- "Examples\n"
- " gn args out/Debug\n"
- " Opens an editor with the args for out/Debug.\n"
- "\n"
- " gn args out/Debug --list --short\n"
- " Prints all arguments with their default values for the out/Debug\n"
- " build.\n"
- "\n"
- " gn args out/Debug --list=target_cpu\n"
- " Prints information about the \"target_cpu\" argument for the "
- "out/Debug\n"
- " build.\n"
- "\n"
- " gn args --list --args=\"os=\\\"android\\\" enable_doom_melon=true\"\n"
- " Prints all arguments with the default values for a build with the\n"
- " given arguments set (which may affect the values of other\n"
- " arguments).\n";
+ R"(gn args <out_dir> [--list] [--short] [--args]
+
+ See also "gn help buildargs" for a more high-level overview of how
+ build arguments work.
+
+Usage
+ gn args <out_dir>
+ Open the arguments for the given build directory in an editor (as
+ specified by the EDITOR environment variable). If the given build
+ directory doesn't exist, it will be created and an empty args file will
+ be opened in the editor. You would type something like this into that
+ file:
+ enable_doom_melon=false
+ os="android"
+
+ Note: you can edit the build args manually by editing the file "args.gn"
+ in the build directory and then running "gn gen <out_dir>".
+
+ gn args <out_dir> --list[=<exact_arg>] [--short]
+ Lists all build arguments available in the current configuration, or, if
+ an exact_arg is specified for the list flag, just that one build
+ argument.
+
+ The output will list the declaration location, default value, and comment
+ preceeding the declaration. If --short is specified, only the names and
+ values will be printed.
+
+ If the out_dir is specified, the build configuration will be taken from
+ that build directory. The reason this is needed is that the definition of
+ some arguments is dependent on the build configuration, so setting some
+ values might add, remove, or change the default values for other
+ arguments. Specifying your exact configuration allows the proper
+ arguments to be displayed.
+
+ Instead of specifying the out_dir, you can also use the command-line flag
+ to specify the build configuration:
+ --args=<exact list of args to use>
+
+Examples
+
+ gn args out/Debug
+ Opens an editor with the args for out/Debug.
+
+ gn args out/Debug --list --short
+ Prints all arguments with their default values for the out/Debug
+ build.
+
+ gn args out/Debug --list=target_cpu
+ Prints information about the "target_cpu" argument for the "
+ "out/Debug
+ build.
+
+ gn args --list --args="os=\"android\" enable_doom_melon=true"
+ Prints all arguments with the default values for a build with the
+ given arguments set (which may affect the values of other
+ arguments).
+)";
int RunArgs(const std::vector<std::string>& args) {
if (args.size() != 1) {
« no previous file with comments | « tools/gn/command_analyze.cc ('k') | tools/gn/command_check.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698