summaryrefslogtreecommitdiff
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-10-15 10:36:21 -0400
committerBrad King <brad.king@kitware.com>2020-10-15 10:53:09 -0400
commitb9cb1d324d500e5b26afee33b6cd565e02117319 (patch)
treec7fe8eb4f2a003296e2755a24673defa01a64a1d /Source/cmMakefile.cxx
parentb1d9a25f35a22f41b2c1b87725f091936711a28c (diff)
downloadcmake-b9cb1d324d500e5b26afee33b6cd565e02117319.tar.gz
Fix regression in test/install/package configuration selection
In commit 7a969fe21d (cmMakefile: Refactor API to better handle empty config values, 2020-06-30, v3.19.0-rc1~567^2), calls to `GetGeneratorConfigs` that pass `OnlyMultiConfig` only want to get any configurations listed if the generator is multi-config. Fix the implementation to actually do that. Fixes: #21316
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 14ec689a6d..0e4f888f03 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -3401,10 +3401,9 @@ std::vector<std::string> cmMakefile::GetGeneratorConfigs(
GeneratorConfigQuery mode) const
{
std::vector<std::string> configs;
- if (this->GetGlobalGenerator()->IsMultiConfig() ||
- mode == cmMakefile::OnlyMultiConfig) {
+ if (this->GetGlobalGenerator()->IsMultiConfig()) {
this->GetDefExpandList("CMAKE_CONFIGURATION_TYPES", configs);
- } else {
+ } else if (mode != cmMakefile::OnlyMultiConfig) {
const std::string& buildType = this->GetSafeDefinition("CMAKE_BUILD_TYPE");
if (!buildType.empty()) {
configs.emplace_back(buildType);