-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
68 lines (54 loc) · 3.22 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
cmake_minimum_required(VERSION 3.9)
project(x-search C CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED 20)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wno-unused-parameter")
include(ExternalProject)
set(MAIN_PROJECT OFF)
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
set(MAIN_PROJECT ON)
endif ()
IF (${MAIN_PROJECT})
# --- BOOST --------------------------------------------------------------------------------------------------------
# find_package(Boost 1.74 REQUIRED COMPONENTS program_options)
# include_directories(${Boost_INCLUDE_DIR})
# ------------------------------------------------------------------------------------------------------------------
# --- GTEST --------------------------------------------------------------------------------------------------------
add_subdirectory(third_party/googletest/)
include_directories(third_party/googletest/googletest/include)
# ------------------------------------------------------------------------------------------------------------------
endif ()
# --- RE2 --------------------------------------------------------------------------------------------------------------
add_subdirectory(third_party/re2/)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/third_party/re2/)
# ----------------------------------------------------------------------------------------------------------------------
# --- X-SEARCH ---------------------------------------------------------------------------------------------------------
include_directories(${PROJECT_SOURCE_DIR}/include/)
add_subdirectory(src)
# ----------------------------------------------------------------------------------------------------------------------
IF (${MAIN_PROJECT})
# ___ Executables __________________________________________________________________________________________________
add_subdirectory(example)
#add_executable(metafile_cat metafile_cat.cpp)
#target_link_libraries(metafile_cat PUBLIC xsearch)
# ___ Benchmarks ___________________________________________________________________________________________________
#add_subdirectory(third_party/nanobench)
#include_directories(third_party/nanobench/src/include)
#add_subdirectory(benchmarks)
# ___ Tests ________________________________________________________________________________________________________
include(CTest)
add_subdirectory(test)
#add_test(MetaFileTest test/src/MetaFileTestMain)
#add_test(DataChunkTest test/src/DataChunkTestMain)
#add_test(ExternSearcherTest test/src/ExternSearcherTestMain)
#add_test(TSQueueTest test/src/utils/TSQueueTestMain)
#add_test(OffsetMappingsTest test/src/string_search/OffsetMappingsTestMain)
#add_test(SearchWrappersTest test/src/string_search/SearchWrappersTestMain)
add_test(SimdSearchTest test/src/string_search/SimdSearchTestMain)
#add_test(xsearchTest test/src/xsearchTestMain)
#add_test(readersTest test/src/tasks/readersTestMain)
#add_test(processorsTest test/src/tasks/processorsTestMain)
#add_test(searcherTest test/src/tasks/searchersTestMain)
endif ()