summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.h
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2020-01-29 22:43:28 (GMT)
committerBrad King <brad.king@kitware.com>2020-02-03 18:27:51 (GMT)
commitb966f86d8637a61e9a829eeee6ed911c5245cae1 (patch)
tree5c1773f4b78013ab22ff16287c40fa285b8d9826 /Source/cmGlobalNinjaGenerator.h
parentfeea34e7eb483e8db28947920757612a95ab1863 (diff)
downloadCMake-b966f86d8637a61e9a829eeee6ed911c5245cae1.zip
CMake-b966f86d8637a61e9a829eeee6ed911c5245cae1.tar.gz
CMake-b966f86d8637a61e9a829eeee6ed911c5245cae1.tar.bz2
Ninja Multi-Config: Shuffle variables around
Remove redundant variable CMAKE_NINJA_MULTI_CROSS_CONFIG_ENABLE. Rename other variables. Document and improve handling of error conditions.
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.h')
-rw-r--r--Source/cmGlobalNinjaGenerator.h27
1 files changed, 15 insertions, 12 deletions
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index 9d5521a..3b45249 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -15,6 +15,8 @@
#include <utility>
#include <vector>
+#include <cm/optional>
+
#include "cm_codecvt.hxx"
#include "cmGeneratedFileStream.h"
@@ -408,12 +410,7 @@ public:
bool EnableCrossConfigBuild() const;
- virtual const char* GetDefaultBuildType() const { return nullptr; }
-
- virtual const char* GetDefaultBuildAlias() const { return nullptr; }
-
- virtual std::set<std::string> GetCrossConfigs(
- const std::string& fileConfig) const;
+ std::set<std::string> GetCrossConfigs(const std::string& config) const;
protected:
void Generate() override;
@@ -426,6 +423,16 @@ protected:
bool OpenFileStream(std::unique_ptr<cmGeneratedFileStream>& stream,
const std::string& name);
+ static cm::optional<std::set<std::string>> ListSubsetWithAll(
+ const std::set<std::string>& defaults,
+ const std::vector<std::string>& items);
+
+ virtual bool InspectConfigTypeVariables() { return true; }
+
+ std::set<std::string> CrossConfigs;
+ std::set<std::string> DefaultConfigs;
+ std::string DefaultFileConfig;
+
private:
std::string GetEditCacheCommand() const override;
bool FindMakeProgram(cmMakefile* mf) override;
@@ -504,6 +511,7 @@ private:
};
using TargetAliasMap = std::map<std::string, TargetAlias>;
TargetAliasMap TargetAliases;
+ TargetAliasMap DefaultTargetAliases;
/// the local cache for calls to ConvertToNinjaPath
mutable std::unordered_map<std::string, std::string> ConvertToNinjaPathCache;
@@ -623,12 +631,7 @@ public:
void GetQtAutoGenConfigs(std::vector<std::string>& configs) const override;
- const char* GetDefaultBuildType() const override;
-
- const char* GetDefaultBuildAlias() const override;
-
- std::set<std::string> GetCrossConfigs(
- const std::string& fileConfig) const override;
+ bool InspectConfigTypeVariables() override;
protected:
bool OpenBuildFileStreams() override;