Skip to content

Commit 8e5e92b

Browse files
authored
Merge pull request #305 from dankmeme01/main
fix /permissive- flag causing a compile error on clang for windows
2 parents 1504792 + b7b17e6 commit 8e5e92b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,15 @@ if(FASTFLOAT_SANITIZE)
5555
target_link_libraries(fast_float INTERFACE -fuse-ld=gold)
5656
endif()
5757
endif()
58-
if(MSVC_VERSION GREATER 1910)
58+
59+
include(CheckCXXCompilerFlag)
60+
unset(FASTFLOAT_COMPILER_SUPPORTS_PERMISSIVE)
61+
CHECK_CXX_COMPILER_FLAG(/permissive- FASTFLOAT_COMPILER_SUPPORTS_PERMISSIVE)
62+
63+
if(FASTFLOAT_COMPILER_SUPPORTS_PERMISSIVE)
5964
target_compile_options(fast_float INTERFACE /permissive-)
6065
endif()
6166

62-
6367
if(FASTFLOAT_INSTALL)
6468
include(CMakePackageConfigHelpers)
6569

0 commit comments

Comments
 (0)