Merge pull request #305 from dankmeme01/main

fix /permissive- flag causing a compile error on clang for windows
This commit is contained in:
Daniel Lemire 2025-03-09 15:15:35 -04:00 committed by GitHub
commit 8e5e92b6e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -55,11 +55,15 @@ if(FASTFLOAT_SANITIZE)
target_link_libraries(fast_float INTERFACE -fuse-ld=gold)
endif()
endif()
if(MSVC_VERSION GREATER 1910)
include(CheckCXXCompilerFlag)
unset(FASTFLOAT_COMPILER_SUPPORTS_PERMISSIVE)
CHECK_CXX_COMPILER_FLAG(/permissive- FASTFLOAT_COMPILER_SUPPORTS_PERMISSIVE)
if(FASTFLOAT_COMPILER_SUPPORTS_PERMISSIVE)
target_compile_options(fast_float INTERFACE /permissive-)
endif()
if(FASTFLOAT_INSTALL)
include(CMakePackageConfigHelpers)