1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2000-2012 Kitware, Inc., Insight Software Consortium
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
8 This software is distributed WITHOUT ANY WARRANTY; without even the
9 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License for more information.
11 ============================================================================*/
12 #ifndef cmGeneratorTarget_h
13 #define cmGeneratorTarget_h
15 #include "cmStandardIncludes.h"
17 class cmComputeLinkInformation;
18 class cmCustomCommand;
19 class cmGlobalGenerator;
20 class cmLocalGenerator;
25 class cmGeneratorTarget
28 cmGeneratorTarget(cmTarget*);
32 const char *GetName() const;
33 const char *GetProperty(const char *prop);
34 bool GetPropertyAsBool(const char *prop);
35 std::vector<cmSourceFile*> const& GetSourceFiles();
39 cmLocalGenerator* LocalGenerator;
40 cmGlobalGenerator* GlobalGenerator;
42 /** Sources classified by purpose. */
43 std::vector<cmSourceFile*> CustomCommands;
44 std::vector<cmSourceFile*> ExtraSources;
45 std::vector<cmSourceFile*> HeaderSources;
46 std::vector<cmSourceFile*> ObjectSources;
47 std::vector<cmSourceFile*> ExternalObjects;
48 std::vector<cmSourceFile*> IDLSources;
49 std::string ModuleDefinitionFile;
51 std::map<cmSourceFile const*, std::string> Objects;
52 std::set<cmSourceFile const*> ExplicitObjectName;
54 /** Full path with trailing slash to the top-level directory
55 holding object files for this target. Includes the build
56 time config name placeholder if needed for the generator. */
57 std::string ObjectDirectory;
59 std::vector<cmTarget*> ObjectLibraries;
61 void UseObjectLibraries(std::vector<std::string>& objs);
63 std::map<cmStdString, cmComputeLinkInformation*> LinkInformation;
65 cmComputeLinkInformation* GetLinkInformation(const char* config);
67 void GetAppleArchs(const char* config,
68 std::vector<std::string>& archVec);
70 ///! Return the rule variable used to create this type of target,
71 // need to add CMAKE_(LANG) for full name.
72 const char* GetCreateRuleVariable();
74 /** Get the include directories for this target. */
75 std::vector<std::string> GetIncludeDirectories(const char *config);
77 std::string GetCompileDefinitions(const char *config = 0);
80 void ClassifySources();
81 void LookupObjectLibraries();
83 cmGeneratorTarget(cmGeneratorTarget const&);
84 void operator=(cmGeneratorTarget const&);
87 typedef std::map<cmTarget*, cmGeneratorTarget*> cmGeneratorTargetsType;