-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathCMakeLists.txt
38 lines (28 loc) · 1009 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
cmake_minimum_required(VERSION 3.2)
project(flatdata-cpp)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
include(flatdata/GenerateSource)
set(CMAKE_CXX_STANDARD 17)
find_package(Boost COMPONENTS system filesystem REQUIRED)
find_package(Threads REQUIRED)
file(GLOB FLATDATA_SOURCE
"src/*.h"
"src/*.inl"
"src/*.cpp")
add_library(flatdata STATIC ${FLATDATA_SOURCE})
set_target_properties(flatdata PROPERTIES POSITION_INDEPENDENT_CODE ON)
if(WITH_DEBUG_DATA_ACCESS_STATISTICS)
message(STATUS "WITH_DEBUG_DATA_ACCESS_STATISTICS enabled")
target_compile_definitions(flatdata PUBLIC DEBUG_DATA_ACCESS_STATISTICS)
endif()
target_include_directories(flatdata
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
PUBLIC $<INSTALL_INTERFACE:include>
PUBLIC ${Boost_INCLUDE_DIRS})
target_link_libraries(flatdata
${Boost_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT})
enable_testing()
add_subdirectory(test)
add_subdirectory(benchmark)
add_subdirectory(examples)