Skip to content

Commit 9519835

Browse files
committed
Cleaner flag setting.
1 parent 0ece926 commit 9519835

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ project(fast_float VERSION 1.0.0 LANGUAGES CXX)
44
option(FASTFLOAT_TEST "Enable tests" OFF)
55
set(CMAKE_CXX_STANDARD 11)
66
set(CMAKE_CXX_STANDARD_REQUIRED ON)
7-
if(MSVC_VERSION GREATER 1910)
8-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -permissive-")
9-
endif()
107
if(FASTFLOAT_TEST)
118
enable_testing()
129
add_subdirectory(tests)
@@ -40,6 +37,10 @@ if(FASTFLOAT_SANITIZE)
4037
target_link_libraries(fast_float INTERFACE -fuse-ld=gold)
4138
endif()
4239
endif()
40+
if(MSVC_VERSION GREATER 1910)
41+
target_compile_options(fast_float INTERFACE /permissive-)
42+
endif()
43+
4344

4445
include(CMakePackageConfigHelpers)
4546

0 commit comments

Comments
 (0)