2016-10-30 18:24:19 +01:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2021-09-14 00:13:48 +02:00
|
|
|
#pragma once
|
2016-07-09 11:21:54 +02:00
|
|
|
|
2017-07-20 19:35:53 +02:00
|
|
|
#include "cmConfigure.h" // IWYU pragma: keep
|
2016-10-30 18:24:19 +01:00
|
|
|
|
2017-04-14 19:02:05 +02:00
|
|
|
#include <map>
|
2018-01-26 17:06:56 +01:00
|
|
|
#include <set>
|
2017-04-14 19:02:05 +02:00
|
|
|
#include <string>
|
2019-11-11 23:01:05 +01:00
|
|
|
#include <utility>
|
2017-04-14 19:02:05 +02:00
|
|
|
#include <vector>
|
2012-04-19 19:04:21 +03:00
|
|
|
|
2017-07-20 19:35:53 +02:00
|
|
|
enum cmNinjaTargetDepends
|
|
|
|
{
|
|
|
|
DependOnTargetArtifact,
|
|
|
|
DependOnTargetOrdering
|
|
|
|
};
|
|
|
|
|
2020-02-01 23:06:01 +01:00
|
|
|
using cmNinjaDeps = std::vector<std::string>;
|
|
|
|
using cmNinjaOuts = std::set<std::string>;
|
|
|
|
using cmNinjaVars = std::map<std::string, std::string>;
|
2012-04-19 19:04:21 +03:00
|
|
|
|
2019-11-11 23:01:05 +01:00
|
|
|
class cmNinjaRule
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
cmNinjaRule(std::string name)
|
|
|
|
: Name(std::move(name))
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string Name;
|
|
|
|
std::string Command;
|
|
|
|
std::string Description;
|
|
|
|
std::string Comment;
|
|
|
|
std::string DepFile;
|
|
|
|
std::string DepType;
|
|
|
|
std::string RspFile;
|
|
|
|
std::string RspContent;
|
|
|
|
std::string Restat;
|
|
|
|
bool Generator = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
class cmNinjaBuild
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
cmNinjaBuild() = default;
|
|
|
|
cmNinjaBuild(std::string rule)
|
|
|
|
: Rule(std::move(rule))
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string Comment;
|
|
|
|
std::string Rule;
|
|
|
|
cmNinjaDeps Outputs;
|
|
|
|
cmNinjaDeps ImplicitOuts;
|
2021-09-14 00:13:48 +02:00
|
|
|
cmNinjaDeps WorkDirOuts; // For cmake_ninja_workdir.
|
2019-11-11 23:01:05 +01:00
|
|
|
cmNinjaDeps ExplicitDeps;
|
|
|
|
cmNinjaDeps ImplicitDeps;
|
|
|
|
cmNinjaDeps OrderOnlyDeps;
|
|
|
|
cmNinjaVars Variables;
|
|
|
|
std::string RspFile;
|
|
|
|
};
|