mirror of
https://github.com/fastfloat/fast_float.git
synced 2025-12-06 08:46:49 +08:00
forked doctest
This commit is contained in:
parent
73b27b7d68
commit
2d2b42bb38
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.9)
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
project(fast_float VERSION 8.0.2 LANGUAGES CXX)
|
||||
set(FASTFLOAT_CXX_STANDARD 11 CACHE STRING "the C++ standard to use for fastfloat")
|
||||
|
||||
@ -9,8 +9,7 @@ option(FASTFLOAT_SUPPLEMENTAL_TESTS "Run supplemental tests" ON)
|
||||
|
||||
if (NOT SYSTEM_DOCTEST)
|
||||
FetchContent_Declare(doctest
|
||||
GIT_REPOSITORY https://github.com/onqtam/doctest.git
|
||||
GIT_TAG v2.4.11)
|
||||
GIT_REPOSITORY https://github.com/lemire/doctest.git)
|
||||
else ()
|
||||
find_package(doctest REQUIRED)
|
||||
endif()
|
||||
@ -33,13 +32,9 @@ endif()
|
||||
|
||||
add_library(supplemental-data INTERFACE)
|
||||
if (FASTFLOAT_SUPPLEMENTAL_TESTS)
|
||||
FetchContent_GetProperties(supplemental_test_files)
|
||||
if(NOT supplemental_test_files_POPULATED)
|
||||
message(STATUS "Supplemental tests enabled. Retrieving test files.")
|
||||
FetchContent_Populate(supplemental_test_files)
|
||||
message(STATUS "Supplemental test files retrieved.")
|
||||
add_subdirectory(${supplemental_test_files_SOURCE_DIR} ${supplemental_test_files_BINARY_DIR})
|
||||
endif()
|
||||
message(STATUS "Supplemental tests enabled. Retrieving test files.")
|
||||
FetchContent_MakeAvailable(supplemental_test_files)
|
||||
message(STATUS "Supplemental test files retrieved.")
|
||||
target_compile_definitions(supplemental-data INTERFACE SUPPLEMENTAL_TEST_DATA_DIR="${supplemental_test_files_BINARY_DIR}/data")
|
||||
endif()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user