cmake/Source/cmGlobalCommonGenerator.h

51 lines
1.3 KiB
C
Raw Normal View History

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
2015-11-17 17:22:37 +01:00
2018-01-26 17:06:56 +01:00
#include "cmConfigure.h" // IWYU pragma: keep
2016-10-30 18:24:19 +01:00
2020-02-01 23:06:01 +01:00
#include <map>
#include <string>
#include <vector>
2015-11-17 17:22:37 +01:00
#include "cmGlobalGenerator.h"
2016-10-30 18:24:19 +01:00
class cmake;
2020-02-01 23:06:01 +01:00
class cmGeneratorTarget;
class cmLocalGenerator;
2016-10-30 18:24:19 +01:00
2015-11-17 17:22:37 +01:00
/** \class cmGlobalCommonGenerator
* \brief Common infrastructure for Makefile and Ninja global generators.
*/
class cmGlobalCommonGenerator : public cmGlobalGenerator
{
public:
cmGlobalCommonGenerator(cmake* cm);
2018-01-26 17:06:56 +01:00
~cmGlobalCommonGenerator() override;
2020-02-01 23:06:01 +01:00
struct DirectoryTarget
{
cmLocalGenerator* LG = nullptr;
struct Target
{
cmGeneratorTarget const* GT = nullptr;
2021-09-14 00:13:48 +02:00
std::vector<std::string> ExcludedFromAllInConfigs;
2020-02-01 23:06:01 +01:00
};
std::vector<Target> Targets;
struct Dir
{
std::string Path;
bool ExcludeFromAll = false;
};
std::vector<Dir> Children;
};
std::map<std::string, DirectoryTarget> ComputeDirectoryTargets() const;
2021-09-14 00:13:48 +02:00
bool IsExcludedFromAllInConfig(const DirectoryTarget::Target& t,
const std::string& config);
2021-11-20 13:41:27 +01:00
protected:
virtual bool SupportsDirectConsole() const { return true; }
const char* GetEditCacheTargetName() const override { return "edit_cache"; }
std::string GetEditCacheCommand() const override;
2015-11-17 17:22:37 +01:00
};