diff --git a/client/displayservers/Windows/CMakeLists.txt b/client/displayservers/Windows/CMakeLists.txt index 3cf111d5..e5ff888e 100644 --- a/client/displayservers/Windows/CMakeLists.txt +++ b/client/displayservers/Windows/CMakeLists.txt @@ -8,6 +8,16 @@ add_library(displayserver_Windows STATIC windows.c ) +if(MSVC) + set_source_files_properties(input_event.c PROPERTIES + COMPILE_OPTIONS "/fp:precise" + ) +elseif(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang") + set_source_files_properties(input_event.c PROPERTIES + COMPILE_OPTIONS "-fno-fast-math" + ) +endif() + target_compile_definitions(displayserver_Windows PRIVATE WINVER=0x0A00 _WIN32_WINNT=0x0A00 diff --git a/client/tests/CMakeLists.txt b/client/tests/CMakeLists.txt index 31d0e9f3..d297558b 100644 --- a/client/tests/CMakeLists.txt +++ b/client/tests/CMakeLists.txt @@ -498,6 +498,17 @@ add_executable(windows-input-tests ../displayservers/Windows/window_size.c ../src/kb.c ) +if(MSVC) + set_source_files_properties( + ../displayservers/Windows/input_event.c PROPERTIES + COMPILE_OPTIONS "/fp:precise" + ) +elseif(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang") + set_source_files_properties( + ../displayservers/Windows/input_event.c PROPERTIES + COMPILE_OPTIONS "-fno-fast-math" + ) +endif() target_compile_definitions(windows-input-tests PRIVATE CIMGUI_DEFINE_ENUMS_AND_STRUCTS=1 )