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)
5555 target_link_libraries (fast_float INTERFACE -fuse-ld=gold)
5656 endif ()
5757endif ()
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 ()
6458
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 ()
6566
6667if (FASTFLOAT_INSTALL)
6768 include (CMakePackageConfigHelpers)
You can’t perform that action at this time.
0 commit comments