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

Side by Side Diff: tools/gn/commands.cc

Issue 2265833002: Implement `gn analyze`. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: do not pretty print the written json; this gets around crlf issues Created 4 years, 3 months 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 unified diff | Download patch
« no previous file with comments | « tools/gn/commands.h ('k') | tools/gn/docs/reference.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_split.h" 8 #include "base/strings/string_split.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "tools/gn/builder.h" 10 #include "tools/gn/builder.h"
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 } 353 }
354 354
355 const CommandInfoMap& GetCommands() { 355 const CommandInfoMap& GetCommands() {
356 static CommandInfoMap info_map; 356 static CommandInfoMap info_map;
357 if (info_map.empty()) { 357 if (info_map.empty()) {
358 #define INSERT_COMMAND(cmd) \ 358 #define INSERT_COMMAND(cmd) \
359 info_map[k##cmd] = CommandInfo(k##cmd##_HelpShort, \ 359 info_map[k##cmd] = CommandInfo(k##cmd##_HelpShort, \
360 k##cmd##_Help, \ 360 k##cmd##_Help, \
361 &Run##cmd); 361 &Run##cmd);
362 362
363 INSERT_COMMAND(Analyze)
363 INSERT_COMMAND(Args) 364 INSERT_COMMAND(Args)
364 INSERT_COMMAND(Check) 365 INSERT_COMMAND(Check)
365 INSERT_COMMAND(Clean) 366 INSERT_COMMAND(Clean)
366 INSERT_COMMAND(Desc) 367 INSERT_COMMAND(Desc)
367 INSERT_COMMAND(Gen) 368 INSERT_COMMAND(Gen)
368 INSERT_COMMAND(Format) 369 INSERT_COMMAND(Format)
369 INSERT_COMMAND(Help) 370 INSERT_COMMAND(Help)
370 INSERT_COMMAND(Ls) 371 INSERT_COMMAND(Ls)
371 INSERT_COMMAND(Path) 372 INSERT_COMMAND(Path)
372 INSERT_COMMAND(Refs) 373 INSERT_COMMAND(Refs)
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 FilterAndPrintTargets(indent, &target_vector); 529 FilterAndPrintTargets(indent, &target_vector);
529 } 530 }
530 531
531 void FilterAndPrintTargetSet(const std::set<const Target*>& targets, 532 void FilterAndPrintTargetSet(const std::set<const Target*>& targets,
532 base::ListValue* out) { 533 base::ListValue* out) {
533 std::vector<const Target*> target_vector(targets.begin(), targets.end()); 534 std::vector<const Target*> target_vector(targets.begin(), targets.end());
534 FilterAndPrintTargets(&target_vector, out); 535 FilterAndPrintTargets(&target_vector, out);
535 } 536 }
536 537
537 } // namespace commands 538 } // namespace commands
OLDNEW
« no previous file with comments | « tools/gn/commands.h ('k') | tools/gn/docs/reference.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698