mirror of
https://github.com/red0124/ssp.git
synced 2025-01-23 04:55:20 +01:00
update cmake
This commit is contained in:
parent
9408c385d6
commit
e366618639
@ -16,6 +16,16 @@ if(ssp_INCLUDE_WITHOUT_SYSTEM)
|
||||
set(ssp_warning_guard "")
|
||||
endif()
|
||||
|
||||
# ---- Dependencies ----
|
||||
|
||||
FetchContent_Declare(
|
||||
fast_float
|
||||
GIT_REPOSITORY https://github.com/red0124/fast_float.git
|
||||
GIT_TAG origin/meson
|
||||
GIT_SHALLOW TRUE)
|
||||
|
||||
FetchContent_MakeAvailable(fast_float)
|
||||
|
||||
# ---- Declare library ----
|
||||
|
||||
add_library(ssp INTERFACE)
|
||||
@ -26,6 +36,7 @@ target_include_directories(
|
||||
${ssp_warning_guard}
|
||||
INTERFACE
|
||||
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>"
|
||||
fast_float
|
||||
)
|
||||
|
||||
target_compile_features(ssp INTERFACE cxx_std_17)
|
||||
|
@ -30,7 +30,7 @@ enable_testing()
|
||||
|
||||
foreach(name IN ITEMS test_splitter test_parser test_converter test_extractions)
|
||||
add_executable("${name}" "${name}.cpp")
|
||||
target_link_libraries("${name}" PRIVATE ssp::ssp doctest::doctest)
|
||||
target_link_libraries("${name}" PRIVATE ssp::ssp fast_float doctest::doctest)
|
||||
target_compile_definitions("${name}" PRIVATE
|
||||
DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN CMAKE_GITHUB_CI)
|
||||
doctest_discover_tests("${name}")
|
||||
|
Loading…
Reference in New Issue
Block a user