File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -55,13 +55,14 @@ if(FASTFLOAT_SANITIZE)
55
55
target_link_libraries (fast_float INTERFACE -fuse-ld=gold )
56
56
endif ()
57
57
endif ()
58
- if (MSVC_VERSION GREATER 1910 )
59
- # /permissive- will only work on MSVC or clang-cl, clang will not accept it.
60
- if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC" )
61
- target_compile_options (fast_float INTERFACE /permissive- )
62
- endif ()
63
- endif ()
64
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 )
64
+ target_compile_options (fast_float INTERFACE /permissive- )
65
+ endif ()
65
66
66
67
if (FASTFLOAT_INSTALL )
67
68
include (CMakePackageConfigHelpers )
You can’t perform that action at this time.
0 commit comments