-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
37 lines (30 loc) · 1.19 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
cmake_minimum_required(VERSION 3.24)
project(hypertrie VERSION 0.9.6
DESCRIPTION "A flexible data structure for low-rank, sparse tensors supporting slices by any dimension and einstein summation (einsum) and a flexible query interface")
include(cmake/boilerplate_init.cmake)
boilerplate_init()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.hpp.in ${CMAKE_CURRENT_SOURCE_DIR}/libs/hypertrie/src/dice/hypertrie/Hypertrie_version.hpp)
if (PROJECT_IS_TOP_LEVEL)
set(CONAN_INSTALL_ARGS "${CONAN_INSTALL_ARGS};-o=boost/*:header_only=True")
if (BUILD_TESTING)
set(CONAN_INSTALL_ARGS "${CONAN_INSTALL_ARGS};-o=&:with_test_deps=True")
endif ()
endif ()
set(style_files
.clang-format
.clang-tidy
)
foreach(style_file ${style_files})
file(DOWNLOAD "https://raw.githubusercontent.com/dice-group/tentris-cpp-coding-guidelines/main/${style_file}"
"${CMAKE_SOURCE_DIR}/${style_file}"
TLS_VERIFY ON)
endforeach()
if (PROJECT_IS_TOP_LEVEL AND USE_CLANG_TIDY)
include(cmake/ClangTidy.cmake)
endif ()
add_subdirectory(libs)
if (PROJECT_IS_TOP_LEVEL AND BUILD_TESTING)
include(CTest)
enable_testing()
add_subdirectory(tests)
endif ()