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_TARGET_H_ | 5 #ifndef TOOLS_GN_TARGET_H_ |
6 #define TOOLS_GN_TARGET_H_ | 6 #define TOOLS_GN_TARGET_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 void set_output_name(const std::string& name) { output_name_ = name; } | 62 void set_output_name(const std::string& name) { output_name_ = name; } |
63 | 63 |
64 const std::string& output_extension() const { return output_extension_; } | 64 const std::string& output_extension() const { return output_extension_; } |
65 void set_output_extension(const std::string& extension) { | 65 void set_output_extension(const std::string& extension) { |
66 output_extension_ = extension; | 66 output_extension_ = extension; |
67 } | 67 } |
68 | 68 |
69 const FileList& sources() const { return sources_; } | 69 const FileList& sources() const { return sources_; } |
70 FileList& sources() { return sources_; } | 70 FileList& sources() { return sources_; } |
71 | 71 |
| 72 // Set to true when all sources are public. This is the default. In this case |
| 73 // the public headers list should be empty. |
| 74 bool all_headers_public() const { return all_headers_public_; } |
| 75 void set_all_headers_public(bool p) { all_headers_public_ = p; } |
| 76 |
| 77 // When all_headers_public is false, this is the list of public headers. It |
| 78 // could be empty which would mean no headers are public. |
| 79 const FileList& public_headers() const { return public_headers_; } |
| 80 FileList& public_headers() { return public_headers_; } |
| 81 |
72 // Compile-time extra dependencies. | 82 // Compile-time extra dependencies. |
73 const FileList& source_prereqs() const { return source_prereqs_; } | 83 const FileList& source_prereqs() const { return source_prereqs_; } |
74 FileList& source_prereqs() { return source_prereqs_; } | 84 FileList& source_prereqs() { return source_prereqs_; } |
75 | 85 |
76 // Runtime dependencies. | 86 // Runtime dependencies. |
77 const FileList& data() const { return data_; } | 87 const FileList& data() const { return data_; } |
78 FileList& data() { return data_; } | 88 FileList& data() { return data_; } |
79 | 89 |
80 // Targets depending on this one should have an order dependency. | 90 // Targets depending on this one should have an order dependency. |
81 bool hard_dep() const { return hard_dep_; } | 91 bool hard_dep() const { return hard_dep_; } |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 private: | 148 private: |
139 // Pulls necessary information from dependents to this one when all | 149 // Pulls necessary information from dependents to this one when all |
140 // dependencies have been resolved. | 150 // dependencies have been resolved. |
141 void PullDependentTargetInfo(std::set<const Config*>* unique_configs); | 151 void PullDependentTargetInfo(std::set<const Config*>* unique_configs); |
142 | 152 |
143 OutputType output_type_; | 153 OutputType output_type_; |
144 std::string output_name_; | 154 std::string output_name_; |
145 std::string output_extension_; | 155 std::string output_extension_; |
146 | 156 |
147 FileList sources_; | 157 FileList sources_; |
| 158 bool all_headers_public_; |
| 159 FileList public_headers_; |
148 FileList source_prereqs_; | 160 FileList source_prereqs_; |
149 FileList data_; | 161 FileList data_; |
150 | 162 |
151 bool hard_dep_; | 163 bool hard_dep_; |
152 | 164 |
153 // Note that if there are any groups in the deps, once the target is resolved | 165 // Note that if there are any groups in the deps, once the target is resolved |
154 // these vectors will list *both* the groups as well as the groups' deps. | 166 // these vectors will list *both* the groups as well as the groups' deps. |
155 // | 167 // |
156 // This is because, in general, groups should be "transparent" ways to add | 168 // This is because, in general, groups should be "transparent" ways to add |
157 // groups of dependencies, so adding the groups deps make this happen with | 169 // groups of dependencies, so adding the groups deps make this happen with |
(...skipping 23 matching lines...) Expand all Loading... |
181 OrderedSet<SourceDir> all_lib_dirs_; | 193 OrderedSet<SourceDir> all_lib_dirs_; |
182 OrderedSet<std::string> all_libs_; | 194 OrderedSet<std::string> all_libs_; |
183 | 195 |
184 ConfigValues config_values_; // Used for all binary targets. | 196 ConfigValues config_values_; // Used for all binary targets. |
185 ActionValues action_values_; // Used for action[_foreach] targets. | 197 ActionValues action_values_; // Used for action[_foreach] targets. |
186 | 198 |
187 DISALLOW_COPY_AND_ASSIGN(Target); | 199 DISALLOW_COPY_AND_ASSIGN(Target); |
188 }; | 200 }; |
189 | 201 |
190 #endif // TOOLS_GN_TARGET_H_ | 202 #endif // TOOLS_GN_TARGET_H_ |
OLD | NEW |