2023-08-19 22:37:55 +02:00
|
|
|
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
|
|
|
|
|
|
|
add_subdirectory(./external)
|
|
|
|
|
|
|
|
project(solanaceae)
|
|
|
|
|
|
|
|
add_library(solanaceae_ngcext
|
|
|
|
./solanaceae/ngc_ext/ngcext.hpp
|
|
|
|
./solanaceae/ngc_ext/ngcext.cpp
|
|
|
|
)
|
2023-08-19 22:50:52 +02:00
|
|
|
target_include_directories(solanaceae_ngcext PUBLIC .)
|
2023-08-19 22:37:55 +02:00
|
|
|
target_compile_features(solanaceae_ngcext PUBLIC cxx_std_17)
|
|
|
|
target_link_libraries(solanaceae_ngcext PUBLIC
|
|
|
|
solanaceae_toxcore
|
|
|
|
solanaceae_util
|
|
|
|
)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
|
|
|
|
add_library(solanaceae_ngcft1
|
|
|
|
./solanaceae/ngc_ft1/ngcft1_file_kind.hpp
|
|
|
|
./solanaceae/ngc_ft1/ngcft1.hpp
|
|
|
|
./solanaceae/ngc_ft1/ngcft1.cpp
|
|
|
|
|
2023-08-23 13:04:54 +02:00
|
|
|
./solanaceae/ngc_ft1/cca.hpp
|
2023-08-29 18:21:12 +02:00
|
|
|
./solanaceae/ngc_ft1/flow_only.hpp
|
|
|
|
./solanaceae/ngc_ft1/flow_only.cpp
|
2023-08-19 22:37:55 +02:00
|
|
|
./solanaceae/ngc_ft1/ledbat.hpp
|
|
|
|
./solanaceae/ngc_ft1/ledbat.cpp
|
2023-08-24 18:04:25 +02:00
|
|
|
./solanaceae/ngc_ft1/cubic.hpp
|
|
|
|
./solanaceae/ngc_ft1/cubic.cpp
|
2023-08-19 22:37:55 +02:00
|
|
|
|
|
|
|
./solanaceae/ngc_ft1/rcv_buf.hpp
|
|
|
|
./solanaceae/ngc_ft1/rcv_buf.cpp
|
|
|
|
./solanaceae/ngc_ft1/snd_buf.hpp
|
|
|
|
./solanaceae/ngc_ft1/snd_buf.cpp
|
|
|
|
)
|
2023-08-19 22:50:52 +02:00
|
|
|
target_include_directories(solanaceae_ngcft1 PUBLIC .)
|
2023-08-19 22:37:55 +02:00
|
|
|
target_compile_features(solanaceae_ngcft1 PUBLIC cxx_std_17)
|
|
|
|
target_link_libraries(solanaceae_ngcft1 PUBLIC
|
|
|
|
solanaceae_ngcext
|
|
|
|
)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
|
|
|
|
add_library(solanaceae_sha1_ngcft1
|
2023-08-21 21:23:13 +02:00
|
|
|
# hacky deps
|
|
|
|
./solanaceae/ngc_ft1_sha1/mio.hpp
|
|
|
|
./solanaceae/ngc_ft1_sha1/file_rw_mapped.hpp
|
2024-07-15 17:44:30 +02:00
|
|
|
./solanaceae/ngc_ft1_sha1/file_constructor.hpp
|
|
|
|
./solanaceae/ngc_ft1_sha1/file_constructor.cpp
|
2023-08-21 21:23:13 +02:00
|
|
|
|
2024-07-17 17:13:32 +02:00
|
|
|
./solanaceae/ngc_ft1_sha1/backends/sha1_mapped_filesystem.hpp
|
|
|
|
./solanaceae/ngc_ft1_sha1/backends/sha1_mapped_filesystem.cpp
|
|
|
|
|
2023-08-19 22:37:55 +02:00
|
|
|
./solanaceae/ngc_ft1_sha1/hash_utils.hpp
|
|
|
|
./solanaceae/ngc_ft1_sha1/hash_utils.cpp
|
|
|
|
|
2024-07-02 16:09:59 +02:00
|
|
|
./solanaceae/ngc_ft1_sha1/util.hpp
|
|
|
|
|
2023-08-19 22:37:55 +02:00
|
|
|
./solanaceae/ngc_ft1_sha1/ft1_sha1_info.hpp
|
|
|
|
./solanaceae/ngc_ft1_sha1/ft1_sha1_info.cpp
|
|
|
|
|
2024-06-24 16:42:23 +02:00
|
|
|
./solanaceae/ngc_ft1_sha1/components.hpp
|
|
|
|
./solanaceae/ngc_ft1_sha1/components.cpp
|
|
|
|
|
2024-07-08 18:12:47 +02:00
|
|
|
./solanaceae/ngc_ft1_sha1/contact_components.hpp
|
|
|
|
|
2024-06-28 21:10:01 +02:00
|
|
|
./solanaceae/ngc_ft1_sha1/chunk_picker.hpp
|
2024-07-02 15:52:25 +02:00
|
|
|
./solanaceae/ngc_ft1_sha1/chunk_picker.cpp
|
2024-06-28 21:10:01 +02:00
|
|
|
|
|
|
|
./solanaceae/ngc_ft1_sha1/participation.hpp
|
|
|
|
./solanaceae/ngc_ft1_sha1/participation.cpp
|
|
|
|
|
2024-07-14 12:38:00 +02:00
|
|
|
./solanaceae/ngc_ft1_sha1/re_announce_systems.hpp
|
|
|
|
./solanaceae/ngc_ft1_sha1/re_announce_systems.cpp
|
|
|
|
|
2024-07-13 12:36:49 +02:00
|
|
|
./solanaceae/ngc_ft1_sha1/chunk_picker_systems.hpp
|
|
|
|
./solanaceae/ngc_ft1_sha1/chunk_picker_systems.cpp
|
|
|
|
|
2024-07-13 11:46:33 +02:00
|
|
|
./solanaceae/ngc_ft1_sha1/transfer_stats_systems.hpp
|
|
|
|
./solanaceae/ngc_ft1_sha1/transfer_stats_systems.cpp
|
|
|
|
|
2024-07-13 13:52:43 +02:00
|
|
|
./solanaceae/ngc_ft1_sha1/sending_transfers.hpp
|
|
|
|
./solanaceae/ngc_ft1_sha1/sending_transfers.cpp
|
|
|
|
|
2024-06-30 14:03:06 +02:00
|
|
|
./solanaceae/ngc_ft1_sha1/receiving_transfers.hpp
|
|
|
|
./solanaceae/ngc_ft1_sha1/receiving_transfers.cpp
|
|
|
|
|
2023-08-19 22:37:55 +02:00
|
|
|
./solanaceae/ngc_ft1_sha1/sha1_ngcft1.hpp
|
|
|
|
./solanaceae/ngc_ft1_sha1/sha1_ngcft1.cpp
|
|
|
|
)
|
2023-08-19 22:50:52 +02:00
|
|
|
target_include_directories(solanaceae_sha1_ngcft1 PUBLIC .)
|
2023-08-19 22:37:55 +02:00
|
|
|
target_compile_features(solanaceae_sha1_ngcft1 PUBLIC cxx_std_17)
|
2023-08-21 21:32:50 +02:00
|
|
|
target_compile_definitions(solanaceae_sha1_ngcft1 PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX)
|
2023-08-19 22:37:55 +02:00
|
|
|
target_link_libraries(solanaceae_sha1_ngcft1 PUBLIC
|
|
|
|
solanaceae_ngcft1
|
|
|
|
sha1::sha1
|
|
|
|
solanaceae_tox_contacts
|
|
|
|
solanaceae_message3
|
2024-04-29 11:55:11 +02:00
|
|
|
solanaceae_object_store
|
2024-05-27 11:20:37 +02:00
|
|
|
solanaceae_file2
|
2023-08-19 22:37:55 +02:00
|
|
|
)
|
|
|
|
|
2024-06-24 12:14:51 +02:00
|
|
|
option(SOLANACEAE_NGCFT1_SHA1_BUILD_TESTING "Build the solanaceae_ngcft1_sha1 tests" OFF)
|
|
|
|
message("II SOLANACEAE_NGCFT1_SHA1_BUILD_TESTING " ${SOLANACEAE_NGCFT1_SHA1_BUILD_TESTING})
|
|
|
|
|
|
|
|
# TODO: proper options n shit
|
|
|
|
if (SOLANACEAE_NGCFT1_SHA1_BUILD_TESTING)
|
|
|
|
include(CTest)
|
|
|
|
|
2024-06-25 12:45:28 +02:00
|
|
|
#add_executable(bitset_tests
|
|
|
|
# ./solanaceae/ngc_ft1_sha1/bitset_tests.cpp
|
|
|
|
#)
|
2024-06-24 12:14:51 +02:00
|
|
|
|
2024-06-25 12:45:28 +02:00
|
|
|
#target_link_libraries(bitset_tests PUBLIC
|
|
|
|
# solanaceae_sha1_ngcft1
|
|
|
|
#)
|
2024-06-24 12:14:51 +02:00
|
|
|
|
|
|
|
endif()
|
|
|
|
|
2024-12-06 14:11:06 +01:00
|
|
|
########################################
|
|
|
|
|
|
|
|
add_library(solanaceae_ngchs2
|
|
|
|
./solanaceae/ngc_hs2/ts_find_start.hpp
|
|
|
|
|
2024-12-07 11:38:31 +01:00
|
|
|
./solanaceae/ngc_hs2/ngc_hs2_sigma.hpp
|
|
|
|
./solanaceae/ngc_hs2/ngc_hs2_sigma.cpp
|
2024-12-06 14:11:06 +01:00
|
|
|
|
2024-12-07 23:34:19 +01:00
|
|
|
./solanaceae/ngc_hs2/ngc_hs2_rizzler.hpp
|
|
|
|
./solanaceae/ngc_hs2/ngc_hs2_rizzler.cpp
|
2024-12-06 14:11:06 +01:00
|
|
|
)
|
|
|
|
target_include_directories(solanaceae_ngchs2 PUBLIC .)
|
|
|
|
target_compile_features(solanaceae_ngchs2 PUBLIC cxx_std_17)
|
|
|
|
target_link_libraries(solanaceae_ngchs2 PUBLIC
|
|
|
|
solanaceae_ngcft1
|
|
|
|
solanaceae_sha1_ngcft1 # HACK: properly abstract filekind/-id
|
|
|
|
solanaceae_tox_contacts
|
|
|
|
solanaceae_message3
|
|
|
|
solanaceae_object_store
|
|
|
|
nlohmann_json::nlohmann_json
|
|
|
|
)
|
|
|
|
|
|
|
|
option(SOLANACEAE_NGCHS2_BUILD_TESTING "Build the solanaceae_ngchs2 tests" OFF)
|
|
|
|
message("II SOLANACEAE_NGCHS2_BUILD_TESTING " ${SOLANACEAE_NGCHS2_BUILD_TESTING})
|
|
|
|
|
|
|
|
if (SOLANACEAE_NGCHS2_BUILD_TESTING)
|
|
|
|
include(CTest)
|
|
|
|
|
|
|
|
add_executable(test_hs2_ts_binarysearch
|
|
|
|
./solanaceae/ngc_hs2/test_ts_binarysearch.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(test_hs2_ts_binarysearch PUBLIC
|
|
|
|
solanaceae_ngchs2
|
|
|
|
)
|
|
|
|
|
|
|
|
add_test(NAME test_hs2_ts_binarysearch COMMAND test_hs2_ts_binarysearch)
|
|
|
|
|
|
|
|
endif()
|
|
|
|
|