From 02cfa72796786b155da7024dc44091622eac575a Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Mon, 5 Feb 2024 10:08:52 -0800 Subject: [PATCH] Workaround clang/LLVM bug with /fp:fast+SSE+float_control (#126) --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f39e37..af3bdba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -260,7 +260,7 @@ endif() if(MSVC) foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME}) - target_compile_options(${t} PRIVATE /Wall /GR- /fp:fast "$<$>:/guard:cf>") + target_compile_options(${t} PRIVATE /Wall /GR- "$<$>:/guard:cf>") target_link_options(${t} PRIVATE /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO) endforeach() @@ -330,7 +330,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") endif() target_compile_options(${PROJECT_NAME} PRIVATE ${WarningsLib}) - set(WarningsEXE ${WarningsLib} "-Wno-c++98-compat" "-Wno-c++98-compat-pedantic" "-Wno-switch" "-Wno-switch-enum" "-Wno-double-promotion" "-Wno-exit-time-destructors" "-Wno-missing-prototypes") + set(WarningsEXE ${WarningsLib} "-Wno-c++98-compat" "-Wno-c++98-compat-pedantic" "-Wno-switch" "-Wno-switch-enum" "-Wno-switch-default" "-Wno-double-promotion" "-Wno-exit-time-destructors" "-Wno-missing-prototypes") foreach(t IN LISTS TOOL_EXES) target_compile_options(${t} PRIVATE ${WarningsEXE}) endforeach() @@ -340,7 +340,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") endforeach() elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME}) - target_compile_options(${t} PRIVATE /sdl /permissive- /JMC- /Zc:__cplusplus /Zc:inline) + target_compile_options(${t} PRIVATE /sdl /permissive- /JMC- /Zc:__cplusplus /Zc:inline /fp:fast) endforeach() if(ENABLE_CODE_ANALYSIS)