From e36661863997834793065590271e2b5728d9362f Mon Sep 17 00:00:00 2001 From: ado Date: Sun, 7 Feb 2021 12:15:53 +0100 Subject: [PATCH] update cmake --- CMakeLists.txt | 11 +++++++++++ test/CMakeLists.txt | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ea263e4..323c897 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 "$" + fast_float ) target_compile_features(ssp INTERFACE cxx_std_17) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 8804b9d..c4669b2 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -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}")