| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 virtual ~Target(); | 44 virtual ~Target(); |
| 45 | 45 |
| 46 // Returns a string naming the output type. | 46 // Returns a string naming the output type. |
| 47 static const char* GetStringForOutputType(OutputType type); | 47 static const char* GetStringForOutputType(OutputType type); |
| 48 | 48 |
| 49 // Item overrides. | 49 // Item overrides. |
| 50 virtual Target* AsTarget() OVERRIDE; | 50 virtual Target* AsTarget() OVERRIDE; |
| 51 virtual const Target* AsTarget() const OVERRIDE; | 51 virtual const Target* AsTarget() const OVERRIDE; |
| 52 virtual void OnResolved() OVERRIDE; | 52 virtual void OnResolved() OVERRIDE; |
| 53 | 53 |
| 54 // This flag indicates if we've run the TargetGenerator for this target to | |
| 55 // fill out the rest of the values. Once we've done this, we save the | |
| 56 // location of the function that started the generating so that we can detect | |
| 57 // duplicate declarations. | |
| 58 bool HasBeenGenerated() const; | |
| 59 void SetGenerated(const Token* token); | |
| 60 | |
| 61 OutputType output_type() const { return output_type_; } | 54 OutputType output_type() const { return output_type_; } |
| 62 void set_output_type(OutputType t) { output_type_ = t; } | 55 void set_output_type(OutputType t) { output_type_ = t; } |
| 63 | 56 |
| 64 bool IsLinkable() const; | 57 bool IsLinkable() const; |
| 65 | 58 |
| 66 // Will be the empty string to use the target label as the output name. | 59 // Will be the empty string to use the target label as the output name. |
| 67 const std::string& output_name() const { return output_name_; } | 60 const std::string& output_name() const { return output_name_; } |
| 68 void set_output_name(const std::string& name) { output_name_ = name; } | 61 void set_output_name(const std::string& name) { output_name_ = name; } |
| 69 | 62 |
| 70 const FileList& sources() const { return sources_; } | 63 const FileList& sources() const { return sources_; } |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 // These libs and dirs are inherited from statically linked deps and all | 178 // These libs and dirs are inherited from statically linked deps and all |
| 186 // configs applying to this target. | 179 // configs applying to this target. |
| 187 OrderedSet<SourceDir> all_lib_dirs_; | 180 OrderedSet<SourceDir> all_lib_dirs_; |
| 188 OrderedSet<std::string> all_libs_; | 181 OrderedSet<std::string> all_libs_; |
| 189 | 182 |
| 190 ConfigValues config_values_; // Used for all binary targets. | 183 ConfigValues config_values_; // Used for all binary targets. |
| 191 ScriptValues script_values_; // Used for script (CUSTOM) targets. | 184 ScriptValues script_values_; // Used for script (CUSTOM) targets. |
| 192 | 185 |
| 193 SourceFile gyp_file_; | 186 SourceFile gyp_file_; |
| 194 | 187 |
| 195 bool generated_; | |
| 196 const Token* generator_function_; // Who generated this: for error messages. | |
| 197 | |
| 198 DISALLOW_COPY_AND_ASSIGN(Target); | 188 DISALLOW_COPY_AND_ASSIGN(Target); |
| 199 }; | 189 }; |
| 200 | 190 |
| 201 #endif // TOOLS_GN_TARGET_H_ | 191 #endif // TOOLS_GN_TARGET_H_ |
| OLD | NEW |