| 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 "tools/gn/builder.h" | 8 #include "tools/gn/builder.h" |
| 9 #include "tools/gn/filesystem_utils.h" | 9 #include "tools/gn/filesystem_utils.h" |
| 10 #include "tools/gn/item.h" | 10 #include "tools/gn/item.h" |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 Err(Location(), "Label not found.", | 390 Err(Location(), "Label not found.", |
| 391 label.GetUserVisibleName(false) + " not found.").PrintToStdout(); | 391 label.GetUserVisibleName(false) + " not found.").PrintToStdout(); |
| 392 return nullptr; | 392 return nullptr; |
| 393 } | 393 } |
| 394 | 394 |
| 395 const Target* target = item->AsTarget(); | 395 const Target* target = item->AsTarget(); |
| 396 if (!target) { | 396 if (!target) { |
| 397 Err(Location(), "Not a target.", | 397 Err(Location(), "Not a target.", |
| 398 "The \"" + label.GetUserVisibleName(false) + "\" thing\n" | 398 "The \"" + label.GetUserVisibleName(false) + "\" thing\n" |
| 399 "is not a target. Somebody should probably implement this command for " | 399 "is not a target. Somebody should probably implement this command for " |
| 400 "other\nitem types."); | 400 "other\nitem types.").PrintToStdout(); |
| 401 return nullptr; | 401 return nullptr; |
| 402 } | 402 } |
| 403 | 403 |
| 404 return target; | 404 return target; |
| 405 } | 405 } |
| 406 | 406 |
| 407 bool ResolveFromCommandLineInput( | 407 bool ResolveFromCommandLineInput( |
| 408 Setup* setup, | 408 Setup* setup, |
| 409 const std::vector<std::string>& input, | 409 const std::vector<std::string>& input, |
| 410 bool all_toolchains, | 410 bool all_toolchains, |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 } | 481 } |
| 482 } | 482 } |
| 483 | 483 |
| 484 void FilterAndPrintTargetSet(bool indent, | 484 void FilterAndPrintTargetSet(bool indent, |
| 485 const std::set<const Target*>& targets) { | 485 const std::set<const Target*>& targets) { |
| 486 std::vector<const Target*> target_vector(targets.begin(), targets.end()); | 486 std::vector<const Target*> target_vector(targets.begin(), targets.end()); |
| 487 FilterAndPrintTargets(indent, &target_vector); | 487 FilterAndPrintTargets(indent, &target_vector); |
| 488 } | 488 } |
| 489 | 489 |
| 490 } // namespace commands | 490 } // namespace commands |
| OLD | NEW |