cmGeneratorTarget.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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 cmCustomCommand;
  14. class cmGlobalGenerator;
  15. class cmLocalGenerator;
  16. class cmMakefile;
  17. class cmSourceFile;
  18. class cmTarget;
  19. class cmGeneratorTarget
  20. {
  21. public:
  22. cmGeneratorTarget(cmTarget*);
  23. int GetType() const;
  24. const char *GetName() const;
  25. const char *GetProperty(const char *prop);
  26. bool GetPropertyAsBool(const char *prop);
  27. std::vector<cmSourceFile*> const& GetSourceFiles();
  28. cmTarget* Target;
  29. cmMakefile* Makefile;
  30. cmLocalGenerator* LocalGenerator;
  31. cmGlobalGenerator* GlobalGenerator;
  32. /** Sources classified by purpose. */
  33. std::vector<cmSourceFile*> CustomCommands;
  34. std::vector<cmSourceFile*> ExtraSources;
  35. std::vector<cmSourceFile*> HeaderSources;
  36. std::vector<cmSourceFile*> ObjectSources;
  37. std::vector<cmSourceFile*> ExternalObjects;
  38. std::vector<cmSourceFile*> IDLSources;
  39. std::string ModuleDefinitionFile;
  40. std::map<cmSourceFile const*, std::string> Objects;
  41. std::set<cmSourceFile const*> ExplicitObjectName;
  42. /** Full path with trailing slash to the top-level directory
  43. holding object files for this target. Includes the build
  44. time config name placeholder if needed for the generator. */
  45. std::string ObjectDirectory;
  46. std::vector<cmTarget*> ObjectLibraries;
  47. void UseObjectLibraries(std::vector<std::string>& objs);
  48. /** Add the target output files to the global generator manifest. */
  49. void GenerateTargetManifest(const char* config);
  50. private:
  51. void ClassifySources();
  52. void LookupObjectLibraries();
  53. cmGeneratorTarget(cmGeneratorTarget const&);
  54. void operator=(cmGeneratorTarget const&);
  55. };
  56. typedef std::map<cmTarget*, cmGeneratorTarget*> cmGeneratorTargetsType;
  57. #endif