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 cmCustomCommand;
18 class cmGlobalGenerator;
19 class cmLocalGenerator;
24 class cmGeneratorTarget
27 cmGeneratorTarget(cmTarget*);
30 const char *GetName() const;
31 const char *GetProperty(const char *prop);
32 bool GetPropertyAsBool(const char *prop);
33 std::vector<cmSourceFile*> const& GetSourceFiles();
37 cmLocalGenerator* LocalGenerator;
38 cmGlobalGenerator* GlobalGenerator;
40 /** Sources classified by purpose. */
41 std::vector<cmSourceFile*> CustomCommands;
42 std::vector<cmSourceFile*> ExtraSources;
43 std::vector<cmSourceFile*> HeaderSources;
44 std::vector<cmSourceFile*> ObjectSources;
45 std::vector<cmSourceFile*> ExternalObjects;
46 std::vector<cmSourceFile*> IDLSources;
47 std::vector<cmSourceFile*> ResxSources;
49 std::string ModuleDefinitionFile;
51 std::map<cmSourceFile const*, std::string> Objects;
52 std::set<cmSourceFile const*> ExplicitObjectName;
54 std::set<std::string> ExpectedResxHeaders;
56 /** Full path with trailing slash to the top-level directory
57 holding object files for this target. Includes the build
58 time config name placeholder if needed for the generator. */
59 std::string ObjectDirectory;
61 std::vector<cmTarget*> ObjectLibraries;
63 void UseObjectLibraries(std::vector<std::string>& objs);
65 void GetAppleArchs(const char* config,
66 std::vector<std::string>& archVec);
68 ///! Return the rule variable used to create this type of target,
69 // need to add CMAKE_(LANG) for full name.
70 const char* GetCreateRuleVariable();
72 /** Get the include directories for this target. */
73 std::vector<std::string> GetIncludeDirectories(const char *config);
75 bool IsSystemIncludeDirectory(const char *dir, const char *config);
78 void ClassifySources();
79 void LookupObjectLibraries();
81 std::map<std::string, std::vector<std::string> > SystemIncludesCache;
83 cmGeneratorTarget(cmGeneratorTarget const&);
84 void operator=(cmGeneratorTarget const&);
87 typedef std::map<cmTarget*, cmGeneratorTarget*> cmGeneratorTargetsType;