diff options
author | Brad King <brad.king@kitware.com> | 2019-09-27 13:23:35 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-09-30 14:33:20 (GMT) |
commit | d713bcb6427381ab8743084726196a4eed96c135 (patch) | |
tree | db9efe36c12ef50225a7e6d5361971f94063899c /Source/cmGlobalCommonGenerator.h | |
parent | a75586c775eb8f663ca1372ff20f9a51e1ad420d (diff) | |
download | CMake-d713bcb6427381ab8743084726196a4eed96c135.zip CMake-d713bcb6427381ab8743084726196a4eed96c135.tar.gz CMake-d713bcb6427381ab8743084726196a4eed96c135.tar.bz2 |
Ninja: Factor out per-dir "all" target computation into common generator
This will make it re-usable for the Makefile generator.
Diffstat (limited to 'Source/cmGlobalCommonGenerator.h')
-rw-r--r-- | Source/cmGlobalCommonGenerator.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Source/cmGlobalCommonGenerator.h b/Source/cmGlobalCommonGenerator.h index e19118b..de81da7 100644 --- a/Source/cmGlobalCommonGenerator.h +++ b/Source/cmGlobalCommonGenerator.h @@ -7,7 +7,13 @@ #include "cmGlobalGenerator.h" +#include <map> +#include <string> +#include <vector> + class cmake; +class cmGeneratorTarget; +class cmLocalGenerator; /** \class cmGlobalCommonGenerator * \brief Common infrastructure for Makefile and Ninja global generators. @@ -17,6 +23,24 @@ class cmGlobalCommonGenerator : public cmGlobalGenerator public: cmGlobalCommonGenerator(cmake* cm); ~cmGlobalCommonGenerator() override; + + struct DirectoryTarget + { + cmLocalGenerator* LG = nullptr; + struct Target + { + cmGeneratorTarget const* GT = nullptr; + bool ExcludeFromAll = false; + }; + std::vector<Target> Targets; + struct Dir + { + std::string Path; + bool ExcludeFromAll = false; + }; + std::vector<Dir> Children; + }; + std::map<std::string, DirectoryTarget> ComputeDirectoryTargets() const; }; #endif |