-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
38 lines (32 loc) · 1.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
# Set the minimum version of CMake that can be used
# To find the cmake version run
# $ cmake --version
cmake_minimum_required(VERSION 3.5)
# Set the project name
project (flatctr)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_CXX_FLAGS "-Wall -Wextra -march=native")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
option(STATIC_LINK "Link executable statically. Off by default." OFF)
if(STATIC_LINK)
set(BUILD_SHARED_LIBS OFF)
set(CMAKE_EXE_LINKER_FLAGS "-static")
endif()
add_subdirectory(${PROJECT_SOURCE_DIR}/src/deps/cxxopts)
add_subdirectory(${PROJECT_SOURCE_DIR}/src/deps/fast_float)
add_subdirectory(${PROJECT_SOURCE_DIR}/src/deps/libcuckoo)
add_subdirectory(${PROJECT_SOURCE_DIR}/src/deps/spdlog)
set(SOURCES src/flatctr.cpp)
add_executable(${PROJECT_NAME} ${SOURCES})
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/src/include/)
target_link_libraries(${PROJECT_NAME}
PRIVATE
cxxopts
fast_float
libcuckoo
spdlog::spdlog
)