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

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

Issue 429423002: Refactor GN source expansions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clang warning Created 6 years, 4 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 | Annotate | Revision Log
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/copy_target_generator.h" 5 #include "tools/gn/copy_target_generator.h"
6 6
7 #include "tools/gn/build_settings.h" 7 #include "tools/gn/build_settings.h"
8 #include "tools/gn/filesystem_utils.h" 8 #include "tools/gn/filesystem_utils.h"
9 #include "tools/gn/parse_tree.h" 9 #include "tools/gn/parse_tree.h"
10 #include "tools/gn/scope.h" 10 #include "tools/gn/scope.h"
(...skipping 17 matching lines...) Expand all
28 return; 28 return;
29 FillOutputs(); 29 FillOutputs();
30 if (err_->has_error()) 30 if (err_->has_error())
31 return; 31 return;
32 32
33 if (target_->sources().empty()) { 33 if (target_->sources().empty()) {
34 *err_ = Err(function_call_, "Empty sources for copy command.", 34 *err_ = Err(function_call_, "Empty sources for copy command.",
35 "You have to specify at least one file to copy in the \"sources\"."); 35 "You have to specify at least one file to copy in the \"sources\".");
36 return; 36 return;
37 } 37 }
38 if (target_->action_values().outputs().size() != 1) { 38 if (target_->action_values().outputs().list().size() != 1) {
39 *err_ = Err(function_call_, "Copy command must have exactly one output.", 39 *err_ = Err(function_call_, "Copy command must have exactly one output.",
40 "You must specify exactly one value in the \"outputs\" array for the " 40 "You must specify exactly one value in the \"outputs\" array for the "
41 "destination of the copy\n(see \"gn help copy\"). If there are " 41 "destination of the copy\n(see \"gn help copy\"). If there are "
42 "multiple sources to copy, use source expansion\n(see \"gn help " 42 "multiple sources to copy, use source expansion\n(see \"gn help "
43 "source_expansion\")."); 43 "source_expansion\").");
44 return; 44 return;
45 } 45 }
46 } 46 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698