Skip to content

Commit 707fccb

Browse files
committed
compile-time generator expression fixes overzealous /permissive- compiler option usage
1 parent 36a2b14 commit 707fccb

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

CMakeLists.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,7 @@ if(FASTFLOAT_SANITIZE)
5757
endif()
5858
endif()
5959

60-
include(CheckCXXCompilerFlag)
61-
unset(FASTFLOAT_COMPILER_SUPPORTS_PERMISSIVE)
62-
CHECK_CXX_COMPILER_FLAG(/permissive- FASTFLOAT_COMPILER_SUPPORTS_PERMISSIVE)
63-
64-
if(FASTFLOAT_COMPILER_SUPPORTS_PERMISSIVE)
65-
target_compile_options(fast_float INTERFACE /permissive-)
66-
endif()
60+
target_compile_options(fast_float INTERFACE $<$<AND:$<CXX_COMPILER_ID:MSVC>,$<VERSION_GREATER_EQUAL:$<CXX_COMPILER_VERSION>,19.10>>:/permissive->)
6761

6862
if(FASTFLOAT_INSTALL)
6963
include(CMakePackageConfigHelpers)

0 commit comments

Comments
 (0)