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 | 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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 PrintTargetsAsOutputs(*targets, out); | 508 PrintTargetsAsOutputs(*targets, out); |
509 break; | 509 break; |
510 } | 510 } |
511 } | 511 } |
512 | 512 |
513 void FilterAndPrintTargets(bool indent, std::vector<const Target*>* targets) { | 513 void FilterAndPrintTargets(bool indent, std::vector<const Target*>* targets) { |
514 base::ListValue tmp; | 514 base::ListValue tmp; |
515 FilterAndPrintTargets(targets, &tmp); | 515 FilterAndPrintTargets(targets, &tmp); |
516 for (const auto& value : tmp) { | 516 for (const auto& value : tmp) { |
517 std::string string; | 517 std::string string; |
518 value.GetAsString(&string); | 518 value->GetAsString(&string); |
519 if (indent) | 519 if (indent) |
520 OutputString(" "); | 520 OutputString(" "); |
521 OutputString(string); | 521 OutputString(string); |
522 OutputString("\n"); | 522 OutputString("\n"); |
523 } | 523 } |
524 } | 524 } |
525 | 525 |
526 void FilterAndPrintTargetSet(bool indent, | 526 void FilterAndPrintTargetSet(bool indent, |
527 const std::set<const Target*>& targets) { | 527 const std::set<const Target*>& targets) { |
528 std::vector<const Target*> target_vector(targets.begin(), targets.end()); | 528 std::vector<const Target*> target_vector(targets.begin(), targets.end()); |
529 FilterAndPrintTargets(indent, &target_vector); | 529 FilterAndPrintTargets(indent, &target_vector); |
530 } | 530 } |
531 | 531 |
532 void FilterAndPrintTargetSet(const std::set<const Target*>& targets, | 532 void FilterAndPrintTargetSet(const std::set<const Target*>& targets, |
533 base::ListValue* out) { | 533 base::ListValue* out) { |
534 std::vector<const Target*> target_vector(targets.begin(), targets.end()); | 534 std::vector<const Target*> target_vector(targets.begin(), targets.end()); |
535 FilterAndPrintTargets(&target_vector, out); | 535 FilterAndPrintTargets(&target_vector, out); |
536 } | 536 } |
537 | 537 |
538 } // namespace commands | 538 } // namespace commands |
OLD | NEW |