From 887134a841b90c643a8439260da755eeaf8bd601 Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Sun, 20 Oct 2024 00:41:39 +0200 Subject: [PATCH] build: turn on warnings-as-errors in git builds with MSVC --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 18ddc074..94cc6561 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -703,6 +703,9 @@ foreach(tgt ${LIBDWARFS_TARGETS} ${LIBDWARFS_OBJECT_TARGETS} dwarfs_test_helpers /wd4456 # declaration hides previous local declaration ) + if(DWARFS_GIT_BUILD) + target_compile_options(${tgt} PRIVATE /WX) + endif() endif() endif()