cmCommonTargetGenerator.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2015 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 cmCommonTargetGenerator_h
  11. #define cmCommonTargetGenerator_h
  12. #include "cmStandardIncludes.h"
  13. class cmGeneratorTarget;
  14. class cmGlobalCommonGenerator;
  15. class cmLocalCommonGenerator;
  16. class cmMakefile;
  17. class cmTarget;
  18. /** \class cmCommonTargetGenerator
  19. * \brief Common infrastructure for Makefile and Ninja per-target generators
  20. */
  21. class cmCommonTargetGenerator
  22. {
  23. public:
  24. cmCommonTargetGenerator(cmGeneratorTarget* gt);
  25. virtual ~cmCommonTargetGenerator();
  26. std::string const& GetConfigName() const;
  27. protected:
  28. // Add language feature flags.
  29. void AddFeatureFlags(std::string& flags, const std::string& lang);
  30. // Feature query methods.
  31. const char* GetFeature(const std::string& feature);
  32. bool GetFeatureAsBool(const std::string& feature);
  33. // Helper to add flag for windows .def file.
  34. void AddModuleDefinitionFlag(std::string& flags);
  35. cmGeneratorTarget* GeneratorTarget;
  36. cmTarget* Target;
  37. cmMakefile* Makefile;
  38. cmLocalCommonGenerator* LocalGenerator;
  39. cmGlobalCommonGenerator* GlobalGenerator;
  40. std::string ConfigName;
  41. // The windows module definition source file (.def), if any.
  42. std::string ModuleDefinitionFile;
  43. };
  44. #endif