Imported Upstream version 2.8.9
[platform/upstream/cmake.git] / Source / cmGeneratorTarget.h
1 /*============================================================================
2   CMake - Cross Platform Makefile Generator
3   Copyright 2000-2012 Kitware, Inc., Insight Software Consortium
4
5   Distributed under the OSI-approved BSD License (the "License");
6   see accompanying file Copyright.txt for details.
7
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
14
15 #include "cmStandardIncludes.h"
16
17 class cmCustomCommand;
18 class cmGlobalGenerator;
19 class cmLocalGenerator;
20 class cmMakefile;
21 class cmSourceFile;
22 class cmTarget;
23
24 class cmGeneratorTarget
25 {
26 public:
27   cmGeneratorTarget(cmTarget*);
28
29   cmTarget* Target;
30   cmMakefile* Makefile;
31   cmLocalGenerator* LocalGenerator;
32   cmGlobalGenerator* GlobalGenerator;
33
34   /** Sources classified by purpose.  */
35   std::vector<cmSourceFile*> CustomCommands;
36   std::vector<cmSourceFile*> ExtraSources;
37   std::vector<cmSourceFile*> HeaderSources;
38   std::vector<cmSourceFile*> ObjectSources;
39   std::vector<cmSourceFile*> ExternalObjects;
40   std::vector<cmSourceFile*> IDLSources;
41   std::string ModuleDefinitionFile;
42
43   std::map<cmSourceFile const*, std::string> Objects;
44   std::set<cmSourceFile const*> ExplicitObjectName;
45
46   /** Full path with trailing slash to the top-level directory
47       holding object files for this target.  Includes the build
48       time config name placeholder if needed for the generator.  */
49   std::string ObjectDirectory;
50
51   std::vector<cmTarget*> ObjectLibraries;
52
53   void UseObjectLibraries(std::vector<std::string>& objs);
54
55 private:
56   void ClassifySources();
57   void LookupObjectLibraries();
58
59   cmGeneratorTarget(cmGeneratorTarget const&);
60   void operator=(cmGeneratorTarget const&);
61 };
62
63 #endif