diff options
author | Brad King <brad.king@kitware.com> | 2020-10-15 14:36:21 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-10-15 14:53:09 (GMT) |
commit | b9cb1d324d500e5b26afee33b6cd565e02117319 (patch) | |
tree | c7fe8eb4f2a003296e2755a24673defa01a64a1d /Source/cmMakefile.cxx | |
parent | b1d9a25f35a22f41b2c1b87725f091936711a28c (diff) | |
download | CMake-b9cb1d324d500e5b26afee33b6cd565e02117319.zip CMake-b9cb1d324d500e5b26afee33b6cd565e02117319.tar.gz CMake-b9cb1d324d500e5b26afee33b6cd565e02117319.tar.bz2 |
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.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 14ec689..0e4f888 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); |