-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
41 lines (33 loc) · 882 Bytes
/
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
cmake_minimum_required(VERSION 3.12)
project(hgdb)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# global options
# set -fPIC everywhere
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
include(CheckCXXCompilerFlag)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
# extern dependencies
add_subdirectory(extern/fmt)
add_subdirectory(extern/sqlite)
# system dependencies
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
if (DEFINED ENV{VERDI_HOME})
find_package(FSDB REQUIRED)
endif()
# set checker flags
include(cmake/SetFlags.cmake)
# some options
option(PERF_COUNT "Collect performance counter" OFF)
# main library
add_subdirectory(src)
# tools
add_subdirectory(tools)
# tests
add_subdirectory(extern/googletest)
include(GoogleTest)
include (CTest)
enable_testing()
add_subdirectory(tests)