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

Unified Diff: tools/gn/command_ls.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_help.cc ('k') | tools/gn/command_path.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/command_ls.cc
diff --git a/tools/gn/command_ls.cc b/tools/gn/command_ls.cc
index 4d14e0fa1d6491360178186a402dcade759ded3c..676ff579a166734144acfe1a0f375a6d7fd72916 100644
--- a/tools/gn/command_ls.cc
+++ b/tools/gn/command_ls.cc
@@ -19,51 +19,52 @@ const char kLs[] = "ls";
const char kLs_HelpShort[] =
"ls: List matching targets.";
const char kLs_Help[] =
- "gn ls <out_dir> [<label_pattern>] [--all-toolchains] [--as=...]\n"
- " [--type=...] [--testonly=...]\n"
- "\n"
- " Lists all targets matching the given pattern for the given build\n"
- " directory. By default, only targets in the default toolchain will\n"
- " be matched unless a toolchain is explicitly supplied.\n"
- "\n"
- " If the label pattern is unspecified, list all targets. The label\n"
- " pattern is not a general regular expression (see\n"
- " \"gn help label_pattern\"). If you need more complex expressions,\n"
- " pipe the result through grep.\n"
- "\n"
- "Options\n"
- "\n"
+ R"(gn ls <out_dir> [<label_pattern>] [--all-toolchains] [--as=...]
+ [--type=...] [--testonly=...]
+
+ Lists all targets matching the given pattern for the given build directory.
+ By default, only targets in the default toolchain will be matched unless a
+ toolchain is explicitly supplied.
+
+ If the label pattern is unspecified, list all targets. The label pattern is
+ not a general regular expression (see "gn help label_pattern"). If you need
+ more complex expressions, pipe the result through grep.
+
+Options
+
+)"
TARGET_PRINTING_MODE_COMMAND_LINE_HELP
- "\n"
+"\n"
ALL_TOOLCHAINS_SWITCH_HELP
- "\n"
+"\n"
TARGET_TESTONLY_FILTER_COMMAND_LINE_HELP
- "\n"
+"\n"
TARGET_TYPE_FILTER_COMMAND_LINE_HELP
- "\n"
- "Examples\n"
- "\n"
- " gn ls out/Debug\n"
- " Lists all targets in the default toolchain.\n"
- "\n"
- " gn ls out/Debug \"//base/*\"\n"
- " Lists all targets in the directory base and all subdirectories.\n"
- "\n"
- " gn ls out/Debug \"//base:*\"\n"
- " Lists all targets defined in //base/BUILD.gn.\n"
- "\n"
- " gn ls out/Debug //base --as=output\n"
- " Lists the build output file for //base:base\n"
- "\n"
- " gn ls out/Debug --type=executable\n"
- " Lists all executables produced by the build.\n"
- "\n"
- " gn ls out/Debug \"//base/*\" --as=output | xargs ninja -C out/Debug\n"
- " Builds all targets in //base and all subdirectories.\n"
- "\n"
- " gn ls out/Debug //base --all-toolchains\n"
- " Lists all variants of the target //base:base (it may be referenced\n"
- " in multiple toolchains).\n";
+R"(
+Examples
+
+ gn ls out/Debug
+ Lists all targets in the default toolchain.
+
+ gn ls out/Debug "//base/*"
+ Lists all targets in the directory base and all subdirectories.
+
+ gn ls out/Debug "//base:*"
+ Lists all targets defined in //base/BUILD.gn.
+
+ gn ls out/Debug //base --as=output
+ Lists the build output file for //base:base
+
+ gn ls out/Debug --type=executable
+ Lists all executables produced by the build.
+
+ gn ls out/Debug "//base/*" --as=output | xargs ninja -C out/Debug
+ Builds all targets in //base and all subdirectories.
+
+ gn ls out/Debug //base --all-toolchains
+ Lists all variants of the target //base:base (it may be referenced
+ in multiple toolchains).
+)";
int RunLs(const std::vector<std::string>& args) {
if (args.size() == 0) {
« no previous file with comments | « tools/gn/command_help.cc ('k') | tools/gn/command_path.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698