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

Unified 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, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/build_settings.h ('k') | tools/gn/command_desc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/build_settings.cc
diff --git a/tools/gn/build_settings.cc b/tools/gn/build_settings.cc
new file mode 100644
index 0000000000000000000000000000000000000000..09b4c99589c57bb8ba3732ff6f0d348d2145bfa1
--- /dev/null
+++ b/tools/gn/build_settings.cc
@@ -0,0 +1,44 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "tools/gn/build_settings.h"
+
+#include "tools/gn/filesystem_utils.h"
+
+BuildSettings::BuildSettings()
+ : item_tree_(),
+ target_manager_(this),
+ toolchain_manager_(this) {
+}
+
+BuildSettings::~BuildSettings() {
+}
+
+void BuildSettings::SetSecondarySourcePath(const SourceDir& d) {
+ secondary_source_path_ = GetFullPath(d);
+}
+
+void BuildSettings::SetBuildDir(const SourceDir& d) {
+ build_dir_ = d;
+ build_to_source_dir_string_ = InvertDir(d);
+}
+
+base::FilePath BuildSettings::GetFullPath(const SourceFile& file) const {
+ return file.Resolve(root_path_);
+}
+
+base::FilePath BuildSettings::GetFullPath(const SourceDir& dir) const {
+ return dir.Resolve(root_path_);
+}
+
+base::FilePath BuildSettings::GetFullPathSecondary(
+ const SourceFile& file) const {
+ return file.Resolve(secondary_source_path_);
+}
+
+base::FilePath BuildSettings::GetFullPathSecondary(
+ const SourceDir& dir) const {
+ return dir.Resolve(secondary_source_path_);
+}
+
« 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