seqtree 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ tests/cpp/doctest.h linguist-vendored
@@ -0,0 +1,12 @@
1
+ .venv/
2
+ build/
3
+ dist/
4
+ wheelhouse/
5
+ *.so
6
+ *.egg-info/
7
+ __pycache__/
8
+ .pytest_cache/
9
+ *.o
10
+ _skbuild/
11
+ docs/_build/
12
+ bench/figures/
@@ -0,0 +1,53 @@
1
+ cmake_minimum_required(VERSION 3.20)
2
+ project(seqtree LANGUAGES CXX)
3
+
4
+ set(CMAKE_CXX_STANDARD 20)
5
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
6
+ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
7
+ if(NOT CMAKE_BUILD_TYPE)
8
+ set(CMAKE_BUILD_TYPE Release)
9
+ endif()
10
+ set(CMAKE_CXX_FLAGS_RELEASE "-O3")
11
+
12
+ option(SEQTREE_TESTS "Build C++ tests" OFF)
13
+ option(SEQTREE_BENCH "Build C++ benchmarks" OFF)
14
+ option(SEQTREE_PYTHON "Build the pybind11 module" OFF)
15
+
16
+ find_package(Threads REQUIRED)
17
+
18
+ add_library(seqtree_core STATIC
19
+ src/codec.cpp
20
+ src/substitution_matrix.cpp
21
+ src/trie.cpp
22
+ src/index.cpp
23
+ src/engine_seqtm.cpp
24
+ src/engine_seqtrie.cpp
25
+ src/searcher.cpp
26
+ )
27
+ target_include_directories(seqtree_core PUBLIC include PRIVATE src)
28
+ target_link_libraries(seqtree_core PUBLIC Threads::Threads)
29
+
30
+ if(SEQTREE_PYTHON)
31
+ find_package(pybind11 CONFIG REQUIRED)
32
+ pybind11_add_module(_core src/_bindings.cpp)
33
+ target_link_libraries(_core PRIVATE seqtree_core)
34
+ install(TARGETS _core DESTINATION seqtree)
35
+ endif()
36
+
37
+ if(SEQTREE_TESTS)
38
+ enable_testing()
39
+ add_executable(seqtree_tests
40
+ tests/cpp/test_codec.cpp
41
+ tests/cpp/test_matrix.cpp
42
+ tests/cpp/test_trie.cpp
43
+ tests/cpp/test_engines.cpp
44
+ )
45
+ target_include_directories(seqtree_tests PRIVATE tests/cpp src)
46
+ target_link_libraries(seqtree_tests PRIVATE seqtree_core)
47
+ add_test(NAME seqtree_tests COMMAND seqtree_tests)
48
+ endif()
49
+
50
+ if(SEQTREE_BENCH)
51
+ add_executable(seqtree_bench bench/bench_seqtree.cpp)
52
+ target_link_libraries(seqtree_bench PRIVATE seqtree_core)
53
+ endif()