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

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

Issue 630223002: gn: Support build directories outside the source tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated patch set Created 6 years, 1 month 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
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 #ifndef TOOLS_GN_BUILD_SETTINGS_H_ 5 #ifndef TOOLS_GN_BUILD_SETTINGS_H_
6 #define TOOLS_GN_BUILD_SETTINGS_H_ 6 #define TOOLS_GN_BUILD_SETTINGS_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 const SourceFile& build_config_file() const { return build_config_file_; } 51 const SourceFile& build_config_file() const { return build_config_file_; }
52 void set_build_config_file(const SourceFile& f) { build_config_file_ = f; } 52 void set_build_config_file(const SourceFile& f) { build_config_file_ = f; }
53 53
54 // The build directory is the root of all output files. The default toolchain 54 // The build directory is the root of all output files. The default toolchain
55 // files go into here, and non-default toolchains will have separate 55 // files go into here, and non-default toolchains will have separate
56 // toolchain-specific root directories inside this. 56 // toolchain-specific root directories inside this.
57 const SourceDir& build_dir() const { return build_dir_; } 57 const SourceDir& build_dir() const { return build_dir_; }
58 void SetBuildDir(const SourceDir& dir); 58 void SetBuildDir(const SourceDir& dir);
59 59
60 // The inverse of relative_build_dir, ending with a separator.
61 // Example: relative_build_dir_ = "out/Debug/" this will be "../../"
62 const std::string& build_to_source_dir_string() const {
63 return build_to_source_dir_string_;
64 }
65
66 // The build args are normally specified on the command-line. 60 // The build args are normally specified on the command-line.
67 Args& build_args() { return build_args_; } 61 Args& build_args() { return build_args_; }
68 const Args& build_args() const { return build_args_; } 62 const Args& build_args() const { return build_args_; }
69 63
70 // Returns the full absolute OS path cooresponding to the given file in the 64 // Returns the full absolute OS path cooresponding to the given file in the
71 // root source tree. 65 // root source tree.
72 base::FilePath GetFullPath(const SourceFile& file) const; 66 base::FilePath GetFullPath(const SourceFile& file) const;
73 base::FilePath GetFullPath(const SourceDir& dir) const; 67 base::FilePath GetFullPath(const SourceDir& dir) const;
74 68
75 // Returns the absolute OS path inside the secondary source path. Will return 69 // Returns the absolute OS path inside the secondary source path. Will return
(...skipping 16 matching lines...) Expand all
92 void set_print_callback(const PrintCallback& cb) { print_callback_ = cb; } 86 void set_print_callback(const PrintCallback& cb) { print_callback_ = cb; }
93 87
94 private: 88 private:
95 base::FilePath root_path_; 89 base::FilePath root_path_;
96 std::string root_path_utf8_; 90 std::string root_path_utf8_;
97 base::FilePath secondary_source_path_; 91 base::FilePath secondary_source_path_;
98 base::FilePath python_path_; 92 base::FilePath python_path_;
99 93
100 SourceFile build_config_file_; 94 SourceFile build_config_file_;
101 SourceDir build_dir_; 95 SourceDir build_dir_;
102 std::string build_to_source_dir_string_;
103 Args build_args_; 96 Args build_args_;
104 97
105 ItemDefinedCallback item_defined_callback_; 98 ItemDefinedCallback item_defined_callback_;
106 PrintCallback print_callback_; 99 PrintCallback print_callback_;
107 100
108 BuildSettings& operator=(const BuildSettings& other); // Disallow. 101 BuildSettings& operator=(const BuildSettings& other); // Disallow.
109 }; 102 };
110 103
111 #endif // TOOLS_GN_BUILD_SETTINGS_H_ 104 #endif // TOOLS_GN_BUILD_SETTINGS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698