summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2020-01-23 19:46:16 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2020-01-23 20:47:12 (GMT)
commitb7a2baf38c1f481f31db9ab41fc129a970287efd (patch)
tree946c797459ed2801bc808623f3c62852e4ff9018 /Source/cmNinjaNormalTargetGenerator.cxx
parentab2fc918216011a03f0fe7696e7bba67fc2627b3 (diff)
downloadCMake-b7a2baf38c1f481f31db9ab41fc129a970287efd.zip
CMake-b7a2baf38c1f481f31db9ab41fc129a970287efd.tar.gz
CMake-b7a2baf38c1f481f31db9ab41fc129a970287efd.tar.bz2
Ninja Multi-Config: Add variable to control configs used in cross-config build
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index a871a92..437548a 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -72,8 +72,9 @@ void cmNinjaNormalTargetGenerator::Generate(const std::string& config)
// Write the build statements
bool firstForConfig = true;
for (auto const& fileConfig : this->GetConfigNames()) {
- if (fileConfig != config &&
- !this->GetGlobalGenerator()->EnableCrossConfigBuild()) {
+ if (!this->GetGlobalGenerator()
+ ->GetCrossConfigs(fileConfig)
+ .count(config)) {
continue;
}
this->WriteObjectBuildStatements(config, fileConfig, firstForConfig);
@@ -85,8 +86,9 @@ void cmNinjaNormalTargetGenerator::Generate(const std::string& config)
} else {
firstForConfig = true;
for (auto const& fileConfig : this->GetConfigNames()) {
- if (fileConfig != config &&
- !this->GetGlobalGenerator()->EnableCrossConfigBuild()) {
+ if (!this->GetGlobalGenerator()
+ ->GetCrossConfigs(fileConfig)
+ .count(config)) {
continue;
}
// If this target has cuda language link inputs, and we need to do