summaryrefslogtreecommitdiffstats
path: root/src/input_common/CMakeLists.txt
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-10-14 08:51:14 +0200
committerLioncash <mathew1800@gmail.com>2020-10-16 01:37:51 +0200
commit046c0c91a3ed665531f20955e7cfb86fe5b73213 (patch)
tree94382af9cc339cf5f384f4d0c8938dd593b4e1c5 /src/input_common/CMakeLists.txt
parentMerge pull request #4787 from lioncash/conversion (diff)
downloadyuzu-046c0c91a3ed665531f20955e7cfb86fe5b73213.tar
yuzu-046c0c91a3ed665531f20955e7cfb86fe5b73213.tar.gz
yuzu-046c0c91a3ed665531f20955e7cfb86fe5b73213.tar.bz2
yuzu-046c0c91a3ed665531f20955e7cfb86fe5b73213.tar.lz
yuzu-046c0c91a3ed665531f20955e7cfb86fe5b73213.tar.xz
yuzu-046c0c91a3ed665531f20955e7cfb86fe5b73213.tar.zst
yuzu-046c0c91a3ed665531f20955e7cfb86fe5b73213.zip
Diffstat (limited to '')
-rw-r--r--src/input_common/CMakeLists.txt29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt
index c84685214..7b39a38c1 100644
--- a/src/input_common/CMakeLists.txt
+++ b/src/input_common/CMakeLists.txt
@@ -29,6 +29,35 @@ add_library(input_common STATIC
udp/udp.h
)
+if (MSVC)
+ target_compile_options(input_common PRIVATE
+ # 'expression' : signed/unsigned mismatch
+ /we4018
+ # 'argument' : conversion from 'type1' to 'type2', possible loss of data (floating-point)
+ /we4244
+ # 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch
+ /we4245
+ # 'operator': conversion from 'type1:field_bits' to 'type2:field_bits', possible loss of data
+ /we4254
+ # 'var' : conversion from 'size_t' to 'type', possible loss of data
+ /we4267
+ # 'context' : truncation from 'type1' to 'type2'
+ /we4305
+ )
+else()
+ target_compile_options(input_common PRIVATE
+ -Werror=conversion
+ -Werror=ignored-qualifiers
+ -Werror=implicit-fallthrough
+ -Werror=reorder
+ -Werror=shadow
+ -Werror=sign-compare
+ -Werror=unused-but-set-parameter
+ -Werror=unused-but-set-variable
+ -Werror=unused-variable
+ )
+endif()
+
if(SDL2_FOUND)
target_sources(input_common PRIVATE
sdl/sdl_impl.cpp