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