| OLD | NEW |
| 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/build_settings.h" | 5 #include "tools/gn/build_settings.h" |
| 6 | 6 |
| 7 #include "tools/gn/filesystem_utils.h" | 7 #include "tools/gn/filesystem_utils.h" |
| 8 | 8 |
| 9 BuildSettings::BuildSettings() | 9 BuildSettings::BuildSettings() |
| 10 : using_external_generator_(false), | 10 : using_external_generator_(false), |
| 11 item_tree_(), | 11 item_tree_(), |
| 12 target_manager_(this), | 12 target_manager_(this), |
| 13 toolchain_manager_(this) { | 13 toolchain_manager_(this) { |
| 14 } | 14 } |
| 15 | 15 |
| 16 BuildSettings::BuildSettings(const BuildSettings& other) |
| 17 : root_path_(other.root_path_), |
| 18 root_path_utf8_(other.root_path_utf8_), |
| 19 secondary_source_path_(other.secondary_source_path_), |
| 20 using_external_generator_(other.using_external_generator_), |
| 21 python_path_(other.python_path_), |
| 22 build_config_file_(other.build_config_file_), |
| 23 build_dir_(other.build_dir_), |
| 24 build_to_source_dir_string_(other.build_to_source_dir_string_), |
| 25 build_args_(other.build_args_), |
| 26 target_resolved_callback_(), // Don't copy. |
| 27 item_tree_(), |
| 28 target_manager_(this), |
| 29 toolchain_manager_(this) { |
| 30 } |
| 31 |
| 16 BuildSettings::~BuildSettings() { | 32 BuildSettings::~BuildSettings() { |
| 17 } | 33 } |
| 18 | 34 |
| 19 void BuildSettings::SetRootPath(const base::FilePath& r) { | 35 void BuildSettings::SetRootPath(const base::FilePath& r) { |
| 20 DCHECK(r.value()[r.value().size() - 1] != base::FilePath::kSeparators[0]); | 36 DCHECK(r.value()[r.value().size() - 1] != base::FilePath::kSeparators[0]); |
| 21 root_path_ = r; | 37 root_path_ = r; |
| 22 root_path_utf8_ = FilePathToUTF8(root_path_); | 38 root_path_utf8_ = FilePathToUTF8(root_path_); |
| 23 } | 39 } |
| 24 | 40 |
| 25 void BuildSettings::SetSecondarySourcePath(const SourceDir& d) { | 41 void BuildSettings::SetSecondarySourcePath(const SourceDir& d) { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 42 base::FilePath BuildSettings::GetFullPathSecondary( | 58 base::FilePath BuildSettings::GetFullPathSecondary( |
| 43 const SourceFile& file) const { | 59 const SourceFile& file) const { |
| 44 return file.Resolve(secondary_source_path_); | 60 return file.Resolve(secondary_source_path_); |
| 45 } | 61 } |
| 46 | 62 |
| 47 base::FilePath BuildSettings::GetFullPathSecondary( | 63 base::FilePath BuildSettings::GetFullPathSecondary( |
| 48 const SourceDir& dir) const { | 64 const SourceDir& dir) const { |
| 49 return dir.Resolve(secondary_source_path_); | 65 return dir.Resolve(secondary_source_path_); |
| 50 } | 66 } |
| 51 | 67 |
| OLD | NEW |