-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
91 lines (77 loc) · 3.09 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
################################################################################
# CMakeLists.txt
#
# Copyright (C) 2021 Florian Kurpicz <[email protected]>
#
# pasta::bit_vector_experiments is free software: you can redistribute
# it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, either version
# 3 of the License, or (at your option) any later version.
#
# pasta::bit_vector_experiments is distributed in the hope that it
# will be useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
# the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with pasta::bit_vector_experiments. If not, see
# <http://www.gnu.org/licenses/>.
#
################################################################################
cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
project(pasta_bit_vector_experiments)
# Compiler flags for used in experiments, i.e., -03, -march=native, and -DNDEBUG
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -fdiagnostics-color=auto -O3 -march=native -DNDEBUG")
# tlx is used for its utility functionality. Add tlx subdirectory only,
# if it has not been added by another project already
if(NOT TARGET tlx)
add_subdirectory(extlib/tlx)
endif()
# Add pasta::utils subdirectory only, if it has not been added by another
# project already
if (NOT TARGET pasta_bit_vector)
add_subdirectory(extlib/bit_vector)
endif()
# Add pasta::utils subdirectory only, if it has not been added by another
# project already
if (NOT TARGET pasta_utils)
add_subdirectory(extlib/utils)
endif()
# Add the Succinct Data Structure Library (SDSL) to the benchmark.
if(NOT TARGET sdsl)
add_subdirectory(extlib/sdsl-lite)
endif()
# Add all sux rank and select data structures to the benchmark.
add_library(sux_rank_select INTERFACE)
target_include_directories(sux_rank_select INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/extlib/sux)
# Add cs-poppy rank and select data structure to the benchmark.
add_library(poppy_rank_select
${CMAKE_CURRENT_SOURCE_DIR}/extlib/rankselect/bitmap.cc)
target_include_directories(poppy_rank_select PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/extlib/)
# Add cs-poppy with better select support
add_library(poppy_rank_select_improved
${CMAKE_CURRENT_SOURCE_DIR}/extlib/rankselect2/bitmap.cc)
target_include_directories(poppy_rank_select PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/extlib/)
add_executable(rank_select_benchmark
${CMAKE_CURRENT_SOURCE_DIR}/benchmarks/rank_select_benchmark.cpp)
target_link_libraries(rank_select_benchmark
sdsl
sux_rank_select
poppy_rank_select
poppy_rank_select_improved
tlx
pasta_bit_vector
pasta_utils
pasta_memory_monitor)
add_executable(bit_vector_to_std_vector
${CMAKE_CURRENT_SOURCE_DIR}/utils/bit_vector_to_std_vector.cpp)
target_link_libraries(bit_vector_to_std_vector
tlx
pasta_bit_vector)
################################################################################