diff options
author | Brad King <brad.king@kitware.com> | 2022-11-15 06:29:53 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-11-15 06:57:02 -0500 |
commit | 94164ea55e3a24274088afd23ad9018aa04b1c50 (patch) | |
tree | 74f1b42b85d8bbec7a00764e2c75f4b6b643d89e /Source | |
parent | 3555265f1df989bbb2bbd8ca408efcb3cb0cfd69 (diff) | |
download | cmake-94164ea55e3a24274088afd23ad9018aa04b1c50.tar.gz |
CMP0141: Fix PCH REUSE_FROM when MSVC_DEBUG_INFORMATION_FORMAT is empty
Under the policy's NEW behavior, `[CMAKE_]MSVC_DEBUG_INFORMATION_FORMAT`
may be explicitly set to an empty string to tell CMake not to add any
flags for this abstraction. In this case, fall back to checking the
language-wide flags as we do in the OLD behavior.
This revises commit 183b9a9eca (CMP0141: Fix PCH REUSE_FROM under policy
NEW behavior, 2022-10-31, v3.25.0-rc3~4^2).
Issue: #24106
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index fb269b28fe..b2b724a8a7 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -2677,8 +2677,10 @@ void cmLocalGenerator::AddPchDependencies(cmGeneratorTarget* target) bool editAndContinueDebugInfo = false; bool programDatabaseDebugInfo = false; - if (cm::optional<std::string> msvcDebugInformationFormat = - this->GetMSVCDebugFormatName(config, target)) { + cm::optional<std::string> msvcDebugInformationFormat = + this->GetMSVCDebugFormatName(config, target); + if (msvcDebugInformationFormat && + !msvcDebugInformationFormat->empty()) { editAndContinueDebugInfo = *msvcDebugInformationFormat == "EditAndContinue"; programDatabaseDebugInfo = |