diff options
Diffstat (limited to 'src/input_common/CMakeLists.txt')
| -rw-r--r-- | src/input_common/CMakeLists.txt | 41 |
1 files changed, 39 insertions, 2 deletions
diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt index 09361e37e..38ab31898 100644 --- a/src/input_common/CMakeLists.txt +++ b/src/input_common/CMakeLists.txt | |||
| @@ -5,8 +5,8 @@ add_library(input_common STATIC | |||
| 5 | keyboard.h | 5 | keyboard.h |
| 6 | main.cpp | 6 | main.cpp |
| 7 | main.h | 7 | main.h |
| 8 | motion_emu.cpp | 8 | motion_from_button.cpp |
| 9 | motion_emu.h | 9 | motion_from_button.h |
| 10 | motion_input.cpp | 10 | motion_input.cpp |
| 11 | motion_input.h | 11 | motion_input.h |
| 12 | settings.cpp | 12 | settings.cpp |
| @@ -17,6 +17,10 @@ add_library(input_common STATIC | |||
| 17 | gcadapter/gc_adapter.h | 17 | gcadapter/gc_adapter.h |
| 18 | gcadapter/gc_poller.cpp | 18 | gcadapter/gc_poller.cpp |
| 19 | gcadapter/gc_poller.h | 19 | gcadapter/gc_poller.h |
| 20 | mouse/mouse_input.cpp | ||
| 21 | mouse/mouse_input.h | ||
| 22 | mouse/mouse_poller.cpp | ||
| 23 | mouse/mouse_poller.h | ||
| 20 | sdl/sdl.cpp | 24 | sdl/sdl.cpp |
| 21 | sdl/sdl.h | 25 | sdl/sdl.h |
| 22 | udp/client.cpp | 26 | udp/client.cpp |
| @@ -27,6 +31,39 @@ add_library(input_common STATIC | |||
| 27 | udp/udp.h | 31 | udp/udp.h |
| 28 | ) | 32 | ) |
| 29 | 33 | ||
| 34 | if (MSVC) | ||
| 35 | target_compile_options(input_common PRIVATE | ||
| 36 | /W4 | ||
| 37 | /WX | ||
| 38 | |||
| 39 | # 'expression' : signed/unsigned mismatch | ||
| 40 | /we4018 | ||
| 41 | # 'argument' : conversion from 'type1' to 'type2', possible loss of data (floating-point) | ||
| 42 | /we4244 | ||
| 43 | # 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch | ||
| 44 | /we4245 | ||
| 45 | # 'operator': conversion from 'type1:field_bits' to 'type2:field_bits', possible loss of data | ||
| 46 | /we4254 | ||
| 47 | # 'var' : conversion from 'size_t' to 'type', possible loss of data | ||
| 48 | /we4267 | ||
| 49 | # 'context' : truncation from 'type1' to 'type2' | ||
| 50 | /we4305 | ||
| 51 | ) | ||
| 52 | else() | ||
| 53 | target_compile_options(input_common PRIVATE | ||
| 54 | -Werror | ||
| 55 | -Werror=conversion | ||
| 56 | -Werror=ignored-qualifiers | ||
| 57 | -Werror=implicit-fallthrough | ||
| 58 | -Werror=reorder | ||
| 59 | -Werror=shadow | ||
| 60 | -Werror=sign-compare | ||
| 61 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-parameter> | ||
| 62 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-variable> | ||
| 63 | -Werror=unused-variable | ||
| 64 | ) | ||
| 65 | endif() | ||
| 66 | |||
| 30 | if(SDL2_FOUND) | 67 | if(SDL2_FOUND) |
| 31 | target_sources(input_common PRIVATE | 68 | target_sources(input_common PRIVATE |
| 32 | sdl/sdl_impl.cpp | 69 | sdl/sdl_impl.cpp |