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 14 matching lines...) Expand all Loading... |
25 class Token; | 25 class Token; |
26 | 26 |
27 class Target : public Item { | 27 class Target : public Item { |
28 public: | 28 public: |
29 enum OutputType { | 29 enum OutputType { |
30 UNKNOWN, | 30 UNKNOWN, |
31 GROUP, | 31 GROUP, |
32 EXECUTABLE, | 32 EXECUTABLE, |
33 SHARED_LIBRARY, | 33 SHARED_LIBRARY, |
34 STATIC_LIBRARY, | 34 STATIC_LIBRARY, |
| 35 SOURCE_SET, |
35 COPY_FILES, | 36 COPY_FILES, |
36 CUSTOM, | 37 CUSTOM, |
37 }; | 38 }; |
38 typedef std::vector<SourceFile> FileList; | 39 typedef std::vector<SourceFile> FileList; |
39 typedef std::vector<std::string> StringVector; | 40 typedef std::vector<std::string> StringVector; |
40 | 41 |
41 Target(const Settings* settings, const Label& label); | 42 Target(const Settings* settings, const Label& label); |
42 virtual ~Target(); | 43 virtual ~Target(); |
43 | 44 |
44 // Returns a string naming the output type. | 45 // Returns a string naming the output type. |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 std::vector<const Target*> deps_; | 169 std::vector<const Target*> deps_; |
169 std::vector<const Target*> datadeps_; | 170 std::vector<const Target*> datadeps_; |
170 | 171 |
171 std::vector<const Config*> configs_; | 172 std::vector<const Config*> configs_; |
172 std::vector<const Config*> all_dependent_configs_; | 173 std::vector<const Config*> all_dependent_configs_; |
173 std::vector<const Config*> direct_dependent_configs_; | 174 std::vector<const Config*> direct_dependent_configs_; |
174 std::vector<const Target*> forward_dependent_configs_; | 175 std::vector<const Target*> forward_dependent_configs_; |
175 | 176 |
176 bool external_; | 177 bool external_; |
177 | 178 |
178 // Libraries from transitive deps. Libraries need to be linked only | 179 // Static libraries and source sets from transitive deps. These things need |
179 // with the end target (executable, shared library). These do not get | 180 // to be linked only with the end target (executable, shared library). These |
180 // pushed beyond shared library boundaries. | 181 // do not get pushed beyond shared library boundaries. |
181 std::set<const Target*> inherited_libraries_; | 182 std::set<const Target*> inherited_libraries_; |
182 | 183 |
183 // These libs and dirs are inherited from statically linked deps and all | 184 // These libs and dirs are inherited from statically linked deps and all |
184 // configs applying to this target. | 185 // configs applying to this target. |
185 OrderedSet<SourceDir> all_lib_dirs_; | 186 OrderedSet<SourceDir> all_lib_dirs_; |
186 OrderedSet<std::string> all_libs_; | 187 OrderedSet<std::string> all_libs_; |
187 | 188 |
188 ConfigValues config_values_; // Used for all binary targets. | 189 ConfigValues config_values_; // Used for all binary targets. |
189 ScriptValues script_values_; // Used for script (CUSTOM) targets. | 190 ScriptValues script_values_; // Used for script (CUSTOM) targets. |
190 | 191 |
191 SourceDir destdir_; | 192 SourceDir destdir_; |
192 | 193 |
193 bool generated_; | 194 bool generated_; |
194 const Token* generator_function_; // Who generated this: for error messages. | 195 const Token* generator_function_; // Who generated this: for error messages. |
195 | 196 |
196 DISALLOW_COPY_AND_ASSIGN(Target); | 197 DISALLOW_COPY_AND_ASSIGN(Target); |
197 }; | 198 }; |
198 | 199 |
199 #endif // TOOLS_GN_TARGET_H_ | 200 #endif // TOOLS_GN_TARGET_H_ |
OLD | NEW |