From d3f69a11f22f43dcd2e25f8f4355392a524744da Mon Sep 17 00:00:00 2001 From: Mark Roszko Date: Tue, 7 May 2024 18:35:30 +0000 Subject: [PATCH] Add policy for CMAKE_MSVC_DEBUG_INFORMATION_FORMAT --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1773d8cfa5..5750a1f92a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,11 @@ cmake_policy( SET CMP0116 OLD ) # The current structure requires the add_custom_command to get called twice, the NEW behavior deduplicates it cmake_policy( SET CMP0113 OLD ) +# Enable CMAKE_MSVC_DEBUG_INFORMATION_FORMAT to override the cmake pdb flags easily +if (POLICY CMP0141) + cmake_policy(SET CMP0141 NEW) +endif (POLICY CMP0141) + # Default to CMAKE_BUILD_TYPE = Release unless overridden on command line # http://www.cmake.org/pipermail/cmake/2008-September/023808.html if( DEFINED CMAKE_BUILD_TYPE )