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

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

Issue 561273003: Add public deps to GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 6 years, 3 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/gn.gyp ('k') | tools/gn/header_checker.h » ('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/group_target_generator.h" 5 #include "tools/gn/group_target_generator.h"
6 6
7 #include "tools/gn/variables.h"
8
7 GroupTargetGenerator::GroupTargetGenerator( 9 GroupTargetGenerator::GroupTargetGenerator(
8 Target* target, 10 Target* target,
9 Scope* scope, 11 Scope* scope,
10 const FunctionCallNode* function_call, 12 const FunctionCallNode* function_call,
11 Err* err) 13 Err* err)
12 : TargetGenerator(target, scope, function_call, err) { 14 : TargetGenerator(target, scope, function_call, err) {
13 } 15 }
14 16
15 GroupTargetGenerator::~GroupTargetGenerator() { 17 GroupTargetGenerator::~GroupTargetGenerator() {
16 } 18 }
17 19
18 void GroupTargetGenerator::DoRun() { 20 void GroupTargetGenerator::DoRun() {
19 target_->set_output_type(Target::GROUP); 21 target_->set_output_type(Target::GROUP);
20 // Groups only have the default types filled in by the target generator 22 // Groups only have the default types filled in by the target generator
21 // base class. 23 // base class.
24
25 // Before there was a deps/public_deps split, a group acted like all deps
26 // are public. During a transition period, if public_deps is not defined,
27 // treat all deps as public. This should be removed and existing groups
28 // updated to use "public_deps" when needed.
29 if (scope_->GetValue(variables::kDeps, false) &&
30 !scope_->GetValue(variables::kPublicDeps, false)) {
31 std::swap(target_->private_deps(), target_->public_deps());
32 }
22 } 33 }
OLDNEW
« no previous file with comments | « tools/gn/gn.gyp ('k') | tools/gn/header_checker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698