diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-01-23 19:46:16 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2020-01-23 20:47:12 (GMT) |
commit | b7a2baf38c1f481f31db9ab41fc129a970287efd (patch) | |
tree | 946c797459ed2801bc808623f3c62852e4ff9018 /Source/cmNinjaNormalTargetGenerator.cxx | |
parent | ab2fc918216011a03f0fe7696e7bba67fc2627b3 (diff) | |
download | CMake-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.cxx | 10 |
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 |