Skip to content

Commit 810a750

Browse files
committed
fix /permissive- flag casuing a compile error on clang for windows
1 parent d28a332 commit 810a750

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ if(FASTFLOAT_SANITIZE)
5656
endif()
5757
endif()
5858
if(MSVC_VERSION GREATER 1910)
59-
target_compile_options(fast_float INTERFACE /permissive-)
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()
6063
endif()
6164

6265

0 commit comments

Comments
 (0)