From f3c40f4a208117ceb49396a381702b01c40efdb0 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Fri, 21 Oct 2022 02:34:06 -0400 Subject: [PATCH] CMakeLists: Treat MSVC warnings as errors --- src/CMakeLists.txt | 2 ++ src/common/CMakeLists.txt | 1 - src/input_common/CMakeLists.txt | 1 - src/shader_recompiler/CMakeLists.txt | 1 - 4 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cfd80886cb..397c1fa23f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -58,6 +58,8 @@ if (MSVC) # Warnings /W3 + /WX + /we4018 # 'expression': signed/unsigned mismatch /we4062 # Enumerator 'identifier' in a switch of enum 'enumeration' is not handled /we4101 # 'identifier': unreferenced local variable diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 043f27fb1c..72c406fe11 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -156,7 +156,6 @@ if (MSVC) ) target_compile_options(common PRIVATE /W4 - /WX /we4242 # 'identifier': conversion from 'type1' to 'type2', possible loss of data /we4244 # 'conversion': conversion from 'type1' to 'type2', possible loss of data diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt index d2730bdc16..bff75338e4 100644 --- a/src/input_common/CMakeLists.txt +++ b/src/input_common/CMakeLists.txt @@ -39,7 +39,6 @@ add_library(input_common STATIC if (MSVC) target_compile_options(input_common PRIVATE /W4 - /WX /we4242 # 'identifier': conversion from 'type1' to 'type2', possible loss of data /we4244 # 'conversion': conversion from 'type1' to 'type2', possible loss of data diff --git a/src/shader_recompiler/CMakeLists.txt b/src/shader_recompiler/CMakeLists.txt index 967da07916..bde1c1329a 100644 --- a/src/shader_recompiler/CMakeLists.txt +++ b/src/shader_recompiler/CMakeLists.txt @@ -241,7 +241,6 @@ target_link_libraries(shader_recompiler PUBLIC common fmt::fmt sirit) if (MSVC) target_compile_options(shader_recompiler PRIVATE /W4 - /WX /we4242 # 'identifier': conversion from 'type1' to 'type2', possible loss of data /we4244 # 'argument' : conversion from 'type1' to 'type2', possible loss of data (floating-point)