mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-30 18:29:37 -06:00
Merge topic 'cmp0141-pch-reuse'
94164ea55e CMP0141: Fix PCH REUSE_FROM when MSVC_DEBUG_INFORMATION_FORMAT is empty
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7914
This commit is contained in:
@@ -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 =
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
cmake_policy(SET CMP0141 NEW)
|
||||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "")
|
||||
string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " -Zi")
|
||||
include(PchReuseFrom-common.cmake)
|
||||
@@ -17,6 +17,9 @@ run_test(SkipPrecompileHeaders)
|
||||
run_test(CXXnotC)
|
||||
run_test(PchReuseFrom-CMP0141-OLD)
|
||||
run_test(PchReuseFrom-CMP0141-NEW)
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
||||
run_test(PchReuseFrom-CMP0141-NEW-empty)
|
||||
endif()
|
||||
run_test(PchReuseFromPrefixed)
|
||||
run_test(PchReuseFromSubdir)
|
||||
run_cmake(PchMultilanguage)
|
||||
|
||||
Reference in New Issue
Block a user