-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
42 lines (32 loc) · 1.11 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
cmake_minimum_required(VERSION 3.2)
project(colouring)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
# Guard against in-source builds and bad build-type strings
include(ConfigSafeGuards)
# Downloads & Compiles external dependencies automatically
include(${CMAKE_MODULE_PATH}/DownloadProject/DownloadProject.cmake)
#Boost
set(BOOST_REQUESTED_VERSION 1.58.0)
find_package(Boost COMPONENTS atomic)
if(NOT Boost_FOUND)
message(FATAL_ERROR "You need the Boost header files for lockfree data structures")
endif()
include_directories(${Boost_INCLUDE_DIRS})
#Common flags and variables
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
set(ROOT ${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${ROOT})
include_directories(${ROOT}/framework)
#Source and include files
file(GLOB_RECURSE SRCS
"data_structure/*.cpp"
"framework/*.cpp")
file(GLOB_RECURSE INCLUDES
"data_structure/*.h"
"framework/*.h")
#Static library packaging
add_library(colouring ${SRCS} ${INCLUDES})
set(CORE_LIBS colouring ${Boost_LIBRARIES})
#nested build scripts
add_subdirectory(tests)
add_subdirectory(micro_benchs)