mirror of
https://github.com/fastfloat/fast_float.git
synced 2025-12-06 16:56:57 +08:00
Merge pull request #144 from OlivierLDff/cxx-standard
🔨 Don't write to global CMAKE_CXX_STANDARD
This commit is contained in:
commit
7396b0f8fa
@ -2,8 +2,6 @@ cmake_minimum_required(VERSION 3.9)
|
|||||||
|
|
||||||
project(fast_float VERSION 3.4.0 LANGUAGES CXX)
|
project(fast_float VERSION 3.4.0 LANGUAGES CXX)
|
||||||
option(FASTFLOAT_TEST "Enable tests" OFF)
|
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)
|
if(FASTFLOAT_TEST)
|
||||||
enable_testing()
|
enable_testing()
|
||||||
add_subdirectory(tests)
|
add_subdirectory(tests)
|
||||||
@ -31,6 +29,7 @@ target_include_directories(
|
|||||||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include>
|
$<INSTALL_INTERFACE:include>
|
||||||
)
|
)
|
||||||
|
target_compile_features(fast_float INTERFACE cxx_std_11)
|
||||||
if(FASTFLOAT_SANITIZE)
|
if(FASTFLOAT_SANITIZE)
|
||||||
target_compile_options(fast_float INTERFACE -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize-recover=all)
|
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)
|
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