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

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

Issue 26537002: Add a UniqueVector class to GN (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: REview comments, remove npos 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
« no previous file with comments | « tools/gn/target_generator.h ('k') | tools/gn/target_unittest.cc » ('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/target_generator.h" 5 #include "tools/gn/target_generator.h"
6 6
7 #include "tools/gn/action_target_generator.h" 7 #include "tools/gn/action_target_generator.h"
8 #include "tools/gn/binary_target_generator.h" 8 #include "tools/gn/binary_target_generator.h"
9 #include "tools/gn/build_settings.h" 9 #include "tools/gn/build_settings.h"
10 #include "tools/gn/config.h" 10 #include "tools/gn/config.h"
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 CHECK(outputs.size() == value->list_value().size()); 232 CHECK(outputs.size() == value->list_value().size());
233 for (size_t i = 0; i < outputs.size(); i++) { 233 for (size_t i = 0; i < outputs.size(); i++) {
234 if (!EnsureStringIsInOutputDir( 234 if (!EnsureStringIsInOutputDir(
235 GetBuildSettings()->build_dir(), 235 GetBuildSettings()->build_dir(),
236 outputs[i], value->list_value()[i], allow_templates, err_)) 236 outputs[i], value->list_value()[i], allow_templates, err_))
237 return; 237 return;
238 } 238 }
239 } 239 }
240 240
241 void TargetGenerator::FillGenericConfigs(const char* var_name, 241 void TargetGenerator::FillGenericConfigs(const char* var_name,
242 LabelConfigVector* dest) { 242 UniqueVector<LabelConfigPair>* dest) {
243 const Value* value = scope_->GetValue(var_name, true); 243 const Value* value = scope_->GetValue(var_name, true);
244 if (value) { 244 if (value) {
245 ExtractListOfLabels(*value, scope_->GetSourceDir(), 245 ExtractListOfUniqueLabels(*value, scope_->GetSourceDir(),
246 ToolchainLabelForScope(scope_), dest, err_); 246 ToolchainLabelForScope(scope_), dest, err_);
247 } 247 }
248 } 248 }
249 249
250 void TargetGenerator::FillGenericDeps(const char* var_name, 250 void TargetGenerator::FillGenericDeps(const char* var_name,
251 LabelTargetVector* dest) { 251 LabelTargetVector* dest) {
252 const Value* value = scope_->GetValue(var_name, true); 252 const Value* value = scope_->GetValue(var_name, true);
253 if (value) { 253 if (value) {
254 ExtractListOfLabels(*value, scope_->GetSourceDir(), 254 ExtractListOfLabels(*value, scope_->GetSourceDir(),
255 ToolchainLabelForScope(scope_), dest, err_); 255 ToolchainLabelForScope(scope_), dest, err_);
256 } 256 }
257 } 257 }
258 258
259 void TargetGenerator::FillForwardDependentConfigs() { 259 void TargetGenerator::FillForwardDependentConfigs() {
260 const Value* value = scope_->GetValue( 260 const Value* value = scope_->GetValue(
261 variables::kForwardDependentConfigsFrom, true); 261 variables::kForwardDependentConfigsFrom, true);
262 if (value) { 262 if (value) {
263 ExtractListOfLabels(*value, scope_->GetSourceDir(), 263 ExtractListOfUniqueLabels(*value, scope_->GetSourceDir(),
264 ToolchainLabelForScope(scope_), 264 ToolchainLabelForScope(scope_),
265 &target_->forward_dependent_configs(), err_); 265 &target_->forward_dependent_configs(), err_);
266 } 266 }
267 } 267 }
OLDNEW
« no previous file with comments | « tools/gn/target_generator.h ('k') | tools/gn/target_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698