OLD | NEW |
(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 |
OLD | NEW |