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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 114 |
115 // A list of a subset of deps where we'll re-export direct_dependent_configs | 115 // A list of a subset of deps where we'll re-export direct_dependent_configs |
116 // as direct_dependent_configs of this target. | 116 // as direct_dependent_configs of this target. |
117 const LabelTargetVector& forward_dependent_configs() const { | 117 const LabelTargetVector& forward_dependent_configs() const { |
118 return forward_dependent_configs_; | 118 return forward_dependent_configs_; |
119 } | 119 } |
120 LabelTargetVector& forward_dependent_configs() { | 120 LabelTargetVector& forward_dependent_configs() { |
121 return forward_dependent_configs_; | 121 return forward_dependent_configs_; |
122 } | 122 } |
123 | 123 |
124 bool external() const { return external_; } | |
125 void set_external(bool e) { external_ = e; } | |
126 | |
127 const std::set<const Target*>& inherited_libraries() const { | 124 const std::set<const Target*>& inherited_libraries() const { |
128 return inherited_libraries_; | 125 return inherited_libraries_; |
129 } | 126 } |
130 | 127 |
131 // This config represents the configuration set directly on this target. | 128 // This config represents the configuration set directly on this target. |
132 ConfigValues& config_values() { return config_values_; } | 129 ConfigValues& config_values() { return config_values_; } |
133 const ConfigValues& config_values() const { return config_values_; } | 130 const ConfigValues& config_values() const { return config_values_; } |
134 | 131 |
135 ActionValues& action_values() { return action_values_; } | 132 ActionValues& action_values() { return action_values_; } |
136 const ActionValues& action_values() const { return action_values_; } | 133 const ActionValues& action_values() const { return action_values_; } |
137 | 134 |
138 const OrderedSet<SourceDir>& all_lib_dirs() const { return all_lib_dirs_; } | 135 const OrderedSet<SourceDir>& all_lib_dirs() const { return all_lib_dirs_; } |
139 const OrderedSet<std::string>& all_libs() const { return all_libs_; } | 136 const OrderedSet<std::string>& all_libs() const { return all_libs_; } |
140 | 137 |
141 const SourceFile& gyp_file() const { return gyp_file_; } | |
142 void set_gyp_file(const SourceFile& gf) { gyp_file_ = gf; } | |
143 | |
144 private: | 138 private: |
145 // Pulls necessary information from dependents to this one when all | 139 // Pulls necessary information from dependents to this one when all |
146 // dependencies have been resolved. | 140 // dependencies have been resolved. |
147 void PullDependentTargetInfo(std::set<const Config*>* unique_configs); | 141 void PullDependentTargetInfo(std::set<const Config*>* unique_configs); |
148 | 142 |
149 OutputType output_type_; | 143 OutputType output_type_; |
150 std::string output_name_; | 144 std::string output_name_; |
151 std::string output_extension_; | 145 std::string output_extension_; |
152 | 146 |
153 FileList sources_; | 147 FileList sources_; |
(...skipping 29 matching lines...) Expand all Loading... |
183 std::set<const Target*> inherited_libraries_; | 177 std::set<const Target*> inherited_libraries_; |
184 | 178 |
185 // These libs and dirs are inherited from statically linked deps and all | 179 // These libs and dirs are inherited from statically linked deps and all |
186 // configs applying to this target. | 180 // configs applying to this target. |
187 OrderedSet<SourceDir> all_lib_dirs_; | 181 OrderedSet<SourceDir> all_lib_dirs_; |
188 OrderedSet<std::string> all_libs_; | 182 OrderedSet<std::string> all_libs_; |
189 | 183 |
190 ConfigValues config_values_; // Used for all binary targets. | 184 ConfigValues config_values_; // Used for all binary targets. |
191 ActionValues action_values_; // Used for action[_foreach] targets. | 185 ActionValues action_values_; // Used for action[_foreach] targets. |
192 | 186 |
193 SourceFile gyp_file_; | |
194 | |
195 DISALLOW_COPY_AND_ASSIGN(Target); | 187 DISALLOW_COPY_AND_ASSIGN(Target); |
196 }; | 188 }; |
197 | 189 |
198 #endif // TOOLS_GN_TARGET_H_ | 190 #endif // TOOLS_GN_TARGET_H_ |
OLD | NEW |