cmGeneratorTarget.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2012 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmGeneratorTarget_h
  11. #define cmGeneratorTarget_h
  12. #include "cmStandardIncludes.h"
  13. class cmComputeLinkInformation;
  14. class cmCustomCommand;
  15. class cmGlobalGenerator;
  16. class cmLocalGenerator;
  17. class cmMakefile;
  18. class cmSourceFile;
  19. class cmTarget;
  20. class cmGeneratorTarget
  21. {
  22. public:
  23. cmGeneratorTarget(cmTarget*);
  24. ~cmGeneratorTarget();
  25. int GetType() const;
  26. const char *GetName() const;
  27. const char *GetProperty(const char *prop);
  28. bool GetPropertyAsBool(const char *prop);
  29. std::vector<cmSourceFile*> const& GetSourceFiles();
  30. cmTarget* Target;
  31. cmMakefile* Makefile;
  32. cmLocalGenerator* LocalGenerator;
  33. cmGlobalGenerator* GlobalGenerator;
  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. std::map<cmSourceFile const*, std::string> Objects;
  43. std::set<cmSourceFile const*> ExplicitObjectName;
  44. /** Full path with trailing slash to the top-level directory
  45. holding object files for this target. Includes the build
  46. time config name placeholder if needed for the generator. */
  47. std::string ObjectDirectory;
  48. std::vector<cmTarget*> ObjectLibraries;
  49. void UseObjectLibraries(std::vector<std::string>& objs);
  50. /** Add the target output files to the global generator manifest. */
  51. void GenerateTargetManifest(const char* config);
  52. std::map<cmStdString, cmComputeLinkInformation*> LinkInformation;
  53. cmComputeLinkInformation* GetLinkInformation(const char* config);
  54. private:
  55. void ClassifySources();
  56. void LookupObjectLibraries();
  57. cmGeneratorTarget(cmGeneratorTarget const&);
  58. void operator=(cmGeneratorTarget const&);
  59. };
  60. typedef std::map<cmTarget*, cmGeneratorTarget*> cmGeneratorTargetsType;
  61. #endif