cmExtraKateGenerator.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #ifndef cmExtraKateGenerator_h
  4. #define cmExtraKateGenerator_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include "cmExternalMakefileProjectGenerator.h"
  7. #include <string>
  8. class cmGeneratedFileStream;
  9. class cmLocalGenerator;
  10. /** \class cmExtraKateGenerator
  11. * \brief Write Kate project files for Makefile or ninja based projects
  12. */
  13. class cmExtraKateGenerator : public cmExternalMakefileProjectGenerator
  14. {
  15. public:
  16. cmExtraKateGenerator();
  17. static cmExternalMakefileProjectGeneratorFactory* GetFactory();
  18. void Generate() override;
  19. private:
  20. void CreateKateProjectFile(const cmLocalGenerator* lg) const;
  21. void CreateDummyKateProjectFile(const cmLocalGenerator* lg) const;
  22. void WriteTargets(const cmLocalGenerator* lg,
  23. cmGeneratedFileStream& fout) const;
  24. void AppendTarget(cmGeneratedFileStream& fout, const std::string& target,
  25. const std::string& make, const std::string& makeArgs,
  26. const std::string& path,
  27. const std::string& homeOutputDir) const;
  28. std::string GenerateFilesString(const cmLocalGenerator* lg) const;
  29. std::string GetPathBasename(const std::string& path) const;
  30. std::string GenerateProjectName(const std::string& name,
  31. const std::string& type,
  32. const std::string& path) const;
  33. std::string ProjectName;
  34. bool UseNinja;
  35. };
  36. #endif