From b2d464ad353ce44fe47966d15c7b81dfbf059d6b Mon Sep 17 00:00:00 2001 From: Ryan Foster Date: Mon, 18 Sep 2023 19:49:01 -0400 Subject: [PATCH] cmake: Ignore LNK4099 warning Despite building the PDBs for qrcodegencpp debug builds, we do not currently ship those PDBs, so MSVC emits an LNK4099 warning, which causes a build failure. It's unlikely that we'll need to debug in linked dependencies, so we can ignore this warning. Should we decide in the future to ship PDBs for these dependencies, the warning would no longer be emitted, and this flag would be superfluous without requiring a change. For now, let's make sure we can build in Debug. --- CMakeLists.txt | 2 ++ cmake/legacy.cmake | 1 + 2 files changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e6721b0..773823b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -168,4 +168,6 @@ if(OS_WINDOWS) TARGET obs-websocket APPEND PROPERTY AUTORCC_OPTIONS --format-version 1) + + target_link_options(obs-websocket PRIVATE /IGNORE:4099) endif() diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index e83d1f93..e7378c6c 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -155,6 +155,7 @@ endif() if(MSVC) target_compile_options(obs-websocket PRIVATE /wd4267 /wd4996) + target_link_options(obs-websocket PRIVATE "LINKER:/IGNORE:4099") else() target_compile_options( obs-websocket