| 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 #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 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 } | 45 } |
| 46 void SetSecondarySourcePath(const SourceDir& d); | 46 void SetSecondarySourcePath(const SourceDir& d); |
| 47 | 47 |
| 48 // Path of the python executable to run scripts with. | 48 // Path of the python executable to run scripts with. |
| 49 base::FilePath python_path() const { return python_path_; } | 49 base::FilePath python_path() const { return python_path_; } |
| 50 void set_python_path(const base::FilePath& p) { python_path_ = p; } | 50 void set_python_path(const base::FilePath& p) { python_path_ = p; } |
| 51 | 51 |
| 52 const SourceFile& build_config_file() const { return build_config_file_; } | 52 const SourceFile& build_config_file() const { return build_config_file_; } |
| 53 void set_build_config_file(const SourceFile& f) { build_config_file_ = f; } | 53 void set_build_config_file(const SourceFile& f) { build_config_file_ = f; } |
| 54 | 54 |
| 55 // Path to a file containing the default text to use when running `gn args`. |
| 56 const SourceFile& arg_file_template_path() const { |
| 57 return arg_file_template_path_; |
| 58 } |
| 59 void set_arg_file_template_path(const SourceFile& f) { |
| 60 arg_file_template_path_ = f; |
| 61 } |
| 62 |
| 55 // The build directory is the root of all output files. The default toolchain | 63 // The build directory is the root of all output files. The default toolchain |
| 56 // files go into here, and non-default toolchains will have separate | 64 // files go into here, and non-default toolchains will have separate |
| 57 // toolchain-specific root directories inside this. | 65 // toolchain-specific root directories inside this. |
| 58 const SourceDir& build_dir() const { return build_dir_; } | 66 const SourceDir& build_dir() const { return build_dir_; } |
| 59 void SetBuildDir(const SourceDir& dir); | 67 void SetBuildDir(const SourceDir& dir); |
| 60 | 68 |
| 61 // The build args are normally specified on the command-line. | 69 // The build args are normally specified on the command-line. |
| 62 Args& build_args() { return build_args_; } | 70 Args& build_args() { return build_args_; } |
| 63 const Args& build_args() const { return build_args_; } | 71 const Args& build_args() const { return build_args_; } |
| 64 | 72 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 95 exec_script_whitelist_ = std::move(list); | 103 exec_script_whitelist_ = std::move(list); |
| 96 } | 104 } |
| 97 | 105 |
| 98 private: | 106 private: |
| 99 base::FilePath root_path_; | 107 base::FilePath root_path_; |
| 100 std::string root_path_utf8_; | 108 std::string root_path_utf8_; |
| 101 base::FilePath secondary_source_path_; | 109 base::FilePath secondary_source_path_; |
| 102 base::FilePath python_path_; | 110 base::FilePath python_path_; |
| 103 | 111 |
| 104 SourceFile build_config_file_; | 112 SourceFile build_config_file_; |
| 113 SourceFile arg_file_template_path_; |
| 105 SourceDir build_dir_; | 114 SourceDir build_dir_; |
| 106 Args build_args_; | 115 Args build_args_; |
| 107 | 116 |
| 108 ItemDefinedCallback item_defined_callback_; | 117 ItemDefinedCallback item_defined_callback_; |
| 109 PrintCallback print_callback_; | 118 PrintCallback print_callback_; |
| 110 | 119 |
| 111 std::unique_ptr<std::set<SourceFile>> exec_script_whitelist_; | 120 std::unique_ptr<std::set<SourceFile>> exec_script_whitelist_; |
| 112 | 121 |
| 113 BuildSettings& operator=(const BuildSettings& other); // Disallow. | 122 BuildSettings& operator=(const BuildSettings& other); // Disallow. |
| 114 }; | 123 }; |
| 115 | 124 |
| 116 #endif // TOOLS_GN_BUILD_SETTINGS_H_ | 125 #endif // TOOLS_GN_BUILD_SETTINGS_H_ |
| OLD | NEW |