resolve cyclic dependency with zstd
[platform/upstream/cmake.git] / Source / cmNinjaTypes.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 <map>
8 #include <set>
9 #include <string>
10 #include <utility>
11 #include <vector>
12
13 enum cmNinjaTargetDepends
14 {
15   DependOnTargetArtifact,
16   DependOnTargetOrdering
17 };
18
19 using cmNinjaDeps = std::vector<std::string>;
20 using cmNinjaOuts = std::set<std::string>;
21 using cmNinjaVars = std::map<std::string, std::string>;
22
23 class cmNinjaRule
24 {
25 public:
26   cmNinjaRule(std::string name)
27     : Name(std::move(name))
28   {
29   }
30
31   std::string Name;
32   std::string Command;
33   std::string Description;
34   std::string Comment;
35   std::string DepFile;
36   std::string DepType;
37   std::string RspFile;
38   std::string RspContent;
39   std::string Restat;
40   bool Generator = false;
41 };
42
43 class cmNinjaBuild
44 {
45 public:
46   cmNinjaBuild() = default;
47   cmNinjaBuild(std::string rule)
48     : Rule(std::move(rule))
49   {
50   }
51
52   std::string Comment;
53   std::string Rule;
54   cmNinjaDeps Outputs;
55   cmNinjaDeps ImplicitOuts;
56   cmNinjaDeps WorkDirOuts; // For cmake_ninja_workdir.
57   cmNinjaDeps ExplicitDeps;
58   cmNinjaDeps ImplicitDeps;
59   cmNinjaDeps OrderOnlyDeps;
60   cmNinjaVars Variables;
61   std::string RspFile;
62 };