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

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

Issue 1606553002: Add support for Mac/iOS application bundles to GN tool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add unit tests & support for bundle_data_filter Created 4 years, 11 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/err.h" 5 #include "tools/gn/err.h"
6 #include "tools/gn/functions.h" 6 #include "tools/gn/functions.h"
7 #include "tools/gn/parse_tree.h" 7 #include "tools/gn/parse_tree.h"
8 #include "tools/gn/scope.h" 8 #include "tools/gn/scope.h"
9 9
10 namespace functions { 10 namespace functions {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 " }\n" 126 " }\n"
127 "\n" 127 "\n"
128 " # This is a template around either a target whose type depends on a\n" 128 " # This is a template around either a target whose type depends on a\n"
129 " # global variable. It forwards all values from the invoker.\n" 129 " # global variable. It forwards all values from the invoker.\n"
130 " template(\"my_wrapper\") {\n" 130 " template(\"my_wrapper\") {\n"
131 " target(my_wrapper_target_type, target_name) {\n" 131 " target(my_wrapper_target_type, target_name) {\n"
132 " forward_variables_from(invoker, \"*\")\n" 132 " forward_variables_from(invoker, \"*\")\n"
133 " }\n" 133 " }\n"
134 " }\n" 134 " }\n"
135 "\n" 135 "\n"
136 " # A template that wraps another. It adds behavior based on one \n" 136 " # A template that wraps another. It adds behavior based on one\n"
137 " # variable, and forwards all others to the nested target.\n" 137 " # variable, and forwards all others to the nested target.\n"
138 " template(\"my_ios_test_app\") {\n" 138 " template(\"my_ios_test_app\") {\n"
139 " ios_test_app(target_name) {\n" 139 " ios_test_app(target_name) {\n"
140 " forward_variables_from(invoker, \"*\", [\"test_bundle_name\"])\n" 140 " forward_variables_from(invoker, \"*\", [\"test_bundle_name\"])\n"
141 " if (!defined(extra_substitutions)) {\n" 141 " if (!defined(extra_substitutions)) {\n"
142 " extra_substitutions = []\n" 142 " extra_substitutions = []\n"
143 " }\n" 143 " }\n"
144 " extra_substitutions += [ \"BUNDLE_ID_TEST_NAME=$test_bundle_name\" " 144 " extra_substitutions += [ \"BUNDLE_ID_TEST_NAME=$test_bundle_name\" "
145 "]\n" 145 "]\n"
146 " }\n" 146 " }\n"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 } 218 }
219 } 219 }
220 220
221 // Not the right type of argument. 221 // Not the right type of argument.
222 *err = Err(what_value, "Not a valid list of variables to copy.", 222 *err = Err(what_value, "Not a valid list of variables to copy.",
223 "Expecting either the string \"*\" or a list of strings."); 223 "Expecting either the string \"*\" or a list of strings.");
224 return Value(); 224 return Value();
225 } 225 }
226 226
227 } // namespace functions 227 } // namespace functions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698