mirror of
https://github.com/fastfloat/fast_float.git
synced 2025-12-06 08:46:49 +08:00
🔨 Don't write to global CMAKE_CXX_STANDARD
Instead use modern target_compile_features with cxx_std_11
This commit is contained in:
parent
bc3be12530
commit
696f5299f0
@ -2,8 +2,6 @@ cmake_minimum_required(VERSION 3.9)
|
||||
|
||||
project(fast_float VERSION 3.4.0 LANGUAGES CXX)
|
||||
option(FASTFLOAT_TEST "Enable tests" OFF)
|
||||
set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ standard to be used")
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
if(FASTFLOAT_TEST)
|
||||
enable_testing()
|
||||
add_subdirectory(tests)
|
||||
@ -30,6 +28,7 @@ target_include_directories(
|
||||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
)
|
||||
target_compile_features(fast_float INTERFACE cxx_std_11)
|
||||
if(FASTFLOAT_SANITIZE)
|
||||
target_compile_options(fast_float INTERFACE -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize-recover=all)
|
||||
target_link_libraries(fast_float INTERFACE -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize-recover=all)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user