mirror of
https://github.com/fastfloat/fast_float.git
synced 2025-12-06 16:56:57 +08:00
improve check for /permissive- flag
This commit is contained in:
parent
810a750306
commit
b7b17e6cac
@ -55,13 +55,14 @@ if(FASTFLOAT_SANITIZE)
|
|||||||
target_link_libraries(fast_float INTERFACE -fuse-ld=gold)
|
target_link_libraries(fast_float INTERFACE -fuse-ld=gold)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(MSVC_VERSION GREATER 1910)
|
|
||||||
# /permissive- will only work on MSVC or clang-cl, clang will not accept it.
|
|
||||||
if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
|
|
||||||
target_compile_options(fast_float INTERFACE /permissive-)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
include(CheckCXXCompilerFlag)
|
||||||
|
unset(FASTFLOAT_COMPILER_SUPPORTS_PERMISSIVE)
|
||||||
|
CHECK_CXX_COMPILER_FLAG(/permissive- FASTFLOAT_COMPILER_SUPPORTS_PERMISSIVE)
|
||||||
|
|
||||||
|
if(FASTFLOAT_COMPILER_SUPPORTS_PERMISSIVE)
|
||||||
|
target_compile_options(fast_float INTERFACE /permissive-)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(FASTFLOAT_INSTALL)
|
if(FASTFLOAT_INSTALL)
|
||||||
include(CMakePackageConfigHelpers)
|
include(CMakePackageConfigHelpers)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user