mirror of
https://github.com/fastfloat/fast_float.git
synced 2026-02-06 09:49:52 +08:00
Merge pull request #270 from pranav-sivaraman/add-find-package
doctest: if SYSTEM_DOCTEST add a `find_package(doctest REQUIRED)`
This commit is contained in:
commit
fe53e769e4
@ -11,6 +11,8 @@ if (NOT SYSTEM_DOCTEST)
|
|||||||
FetchContent_Declare(doctest
|
FetchContent_Declare(doctest
|
||||||
GIT_REPOSITORY https://github.com/onqtam/doctest.git
|
GIT_REPOSITORY https://github.com/onqtam/doctest.git
|
||||||
GIT_TAG v2.4.11)
|
GIT_TAG v2.4.11)
|
||||||
|
else ()
|
||||||
|
find_package(doctest REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
if (FASTFLOAT_SUPPLEMENTAL_TESTS)
|
if (FASTFLOAT_SUPPLEMENTAL_TESTS)
|
||||||
FetchContent_Declare(supplemental_test_files
|
FetchContent_Declare(supplemental_test_files
|
||||||
@ -59,6 +61,8 @@ function(fast_float_add_cpp_test TEST_NAME)
|
|||||||
target_link_libraries(${TEST_NAME} PUBLIC fast_float supplemental-data)
|
target_link_libraries(${TEST_NAME} PUBLIC fast_float supplemental-data)
|
||||||
if (NOT SYSTEM_DOCTEST)
|
if (NOT SYSTEM_DOCTEST)
|
||||||
target_link_libraries(${TEST_NAME} PUBLIC doctest)
|
target_link_libraries(${TEST_NAME} PUBLIC doctest)
|
||||||
|
else ()
|
||||||
|
target_link_libraries(${TEST_NAME} PUBLIC doctest::doctest)
|
||||||
endif()
|
endif()
|
||||||
endfunction(fast_float_add_cpp_test)
|
endfunction(fast_float_add_cpp_test)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user