fix /permissive- flag casuing a compile error on clang for windows

This commit is contained in:
dankmeme01 2025-02-26 12:18:16 +01:00
parent d28a3320c2
commit 810a750306

View File

@ -56,7 +56,10 @@ if(FASTFLOAT_SANITIZE)
endif()
endif()
if(MSVC_VERSION GREATER 1910)
target_compile_options(fast_float INTERFACE /permissive-)
# /permissive- will only work on MSVC or clang-cl, clang will not accept it.
if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
target_compile_options(fast_float INTERFACE /permissive-)
endif()
endif()