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

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

Issue 1263053003: Add forward_variables_from() and target() to GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More spelling fixes Created 5 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/test_with_scope.h ('k') | no next file » | 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/test_with_scope.h" 5 #include "tools/gn/test_with_scope.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "tools/gn/parser.h" 8 #include "tools/gn/parser.h"
9 #include "tools/gn/tokenizer.h" 9 #include "tools/gn/tokenizer.h"
10 10
11 TestWithScope::TestWithScope() 11 TestWithScope::TestWithScope()
12 : build_settings_(), 12 : build_settings_(),
13 settings_(&build_settings_, std::string()), 13 settings_(&build_settings_, std::string()),
14 toolchain_(&settings_, Label(SourceDir("//toolchain/"), "default")), 14 toolchain_(&settings_, Label(SourceDir("//toolchain/"), "default")),
15 scope_(&settings_) { 15 scope_(&settings_),
16 scope_progammatic_provider_(&scope_, true) {
16 build_settings_.SetBuildDir(SourceDir("//out/Debug/")); 17 build_settings_.SetBuildDir(SourceDir("//out/Debug/"));
17 build_settings_.set_print_callback( 18 build_settings_.set_print_callback(
18 base::Bind(&TestWithScope::AppendPrintOutput, base::Unretained(this))); 19 base::Bind(&TestWithScope::AppendPrintOutput, base::Unretained(this)));
19 20
20 settings_.set_toolchain_label(toolchain_.label()); 21 settings_.set_toolchain_label(toolchain_.label());
21 settings_.set_default_toolchain_label(toolchain_.label()); 22 settings_.set_default_toolchain_label(toolchain_.label());
22 23
23 SetupToolchain(&toolchain_); 24 SetupToolchain(&toolchain_);
24 } 25 }
25 26
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 const std::string& label_string, 150 const std::string& label_string,
150 Target::OutputType type) 151 Target::OutputType type)
151 : Target(setup.settings(), setup.ParseLabel(label_string)) { 152 : Target(setup.settings(), setup.ParseLabel(label_string)) {
152 visibility().SetPublic(); 153 visibility().SetPublic();
153 set_output_type(type); 154 set_output_type(type);
154 SetToolchain(setup.toolchain()); 155 SetToolchain(setup.toolchain());
155 } 156 }
156 157
157 TestTarget::~TestTarget() { 158 TestTarget::~TestTarget() {
158 } 159 }
OLDNEW
« no previous file with comments | « tools/gn/test_with_scope.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698