-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
62 lines (46 loc) · 1.17 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
cmake_minimum_required(VERSION 3.23..3.30)
project(
hammingdist
VERSION 1.3.0
LANGUAGES CXX)
include(CTest)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CXX_STANDARD 17)
# compilation options
set(HAMMING_WITH_OPENMP
no
CACHE BOOL "Build with OpenMP support (multithreading)")
set(HAMMING_BUILD_BENCHMARKS
yes
CACHE BOOL "Build hamming benchmarks")
set(HAMMING_BUILD_PYTHON
yes
CACHE BOOL "Build hammingdist python interface")
set(HAMMING_WITH_SSE2
yes
CACHE BOOL "Enable SSE2 optimized code on x86_64 CPUs")
set(HAMMING_WITH_AVX2
yes
CACHE BOOL "Enable AVX2 optimized code on x86_64 CPUs")
set(HAMMING_WITH_AVX512
yes
CACHE BOOL "Enable AVX512 optimized code on x86_64 CPUs")
set(HAMMING_WITH_NEON
no
CACHE BOOL "Enable NEON optimized code on Arm64 CPUs")
set(HAMMING_WITH_CUDA
no
CACHE BOOL "Build with CUDA support (nvidia gpu)")
if(HAMMING_WITH_CUDA)
enable_language(CUDA)
endif()
# Add git submodules
add_subdirectory(ext)
# Build the hamming library
add_subdirectory(src)
# The python package
if(HAMMING_BUILD_PYTHON)
add_subdirectory(python)
endif()
include(FeatureSummary)
feature_summary(WHAT ALL)