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

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

Issue 21114002: Add initial prototype for the GN meta-buildsystem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add owners and readme Created 7 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
« no previous file with comments | « tools/gn/build_settings.h ('k') | tools/gn/command_desc.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "tools/gn/build_settings.h"
6
7 #include "tools/gn/filesystem_utils.h"
8
9 BuildSettings::BuildSettings()
10 : item_tree_(),
11 target_manager_(this),
12 toolchain_manager_(this) {
13 }
14
15 BuildSettings::~BuildSettings() {
16 }
17
18 void BuildSettings::SetSecondarySourcePath(const SourceDir& d) {
19 secondary_source_path_ = GetFullPath(d);
20 }
21
22 void BuildSettings::SetBuildDir(const SourceDir& d) {
23 build_dir_ = d;
24 build_to_source_dir_string_ = InvertDir(d);
25 }
26
27 base::FilePath BuildSettings::GetFullPath(const SourceFile& file) const {
28 return file.Resolve(root_path_);
29 }
30
31 base::FilePath BuildSettings::GetFullPath(const SourceDir& dir) const {
32 return dir.Resolve(root_path_);
33 }
34
35 base::FilePath BuildSettings::GetFullPathSecondary(
36 const SourceFile& file) const {
37 return file.Resolve(secondary_source_path_);
38 }
39
40 base::FilePath BuildSettings::GetFullPathSecondary(
41 const SourceDir& dir) const {
42 return dir.Resolve(secondary_source_path_);
43 }
44
OLDNEW
« no previous file with comments | « tools/gn/build_settings.h ('k') | tools/gn/command_desc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698