1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
5 #include "cmConfigure.h" // IWYU pragma: keep
11 #include "cmGlobalGenerator.h"
14 class cmGeneratorTarget;
15 class cmLocalGenerator;
17 /** \class cmGlobalCommonGenerator
18 * \brief Common infrastructure for Makefile and Ninja global generators.
20 class cmGlobalCommonGenerator : public cmGlobalGenerator
23 cmGlobalCommonGenerator(cmake* cm);
24 ~cmGlobalCommonGenerator() override;
26 struct DirectoryTarget
28 cmLocalGenerator* LG = nullptr;
31 cmGeneratorTarget const* GT = nullptr;
32 std::vector<std::string> ExcludedFromAllInConfigs;
34 std::vector<Target> Targets;
38 bool ExcludeFromAll = false;
40 std::vector<Dir> Children;
42 std::map<std::string, DirectoryTarget> ComputeDirectoryTargets() const;
43 bool IsExcludedFromAllInConfig(const DirectoryTarget::Target& t,
44 const std::string& config);
47 virtual bool SupportsDirectConsole() const { return true; }
48 const char* GetEditCacheTargetName() const override { return "edit_cache"; }
49 std::string GetEditCacheCommand() const override;