-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
46 lines (36 loc) · 1.35 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
cmake_minimum_required (VERSION 3.5)
project (KERNEL CXX C) # check for C/C++ compiler
set (CMAKE_CXX_STANDARD 11)
set (CMAKE_CXX_FLAGS "-Wno-deprecated-register")
set (Kernel_Include_Dirs
${KERNEL_SOURCE_DIR}/src/Kernel/Containers/
${KERNEL_SOURCE_DIR}/src/Kernel/Abstractions/
${KERNEL_SOURCE_DIR}/src/Kernel/Types/
${KERNEL_SOURCE_DIR}/src/System/Misc/
${KERNEL_SOURCE_DIR}/src/System/Files/
${KERNEL_SOURCE_DIR}/src/Data/String/
${KERNEL_SOURCE_DIR}/src/Data/Drd/
${KERNEL_SOURCE_DIR}/src/Data/Tree/
)
file (GLOB_RECURSE Kernel_SRCS
"${KERNEL_SOURCE_DIR}/src/Kernel/*.cpp"
"${KERNEL_SOURCE_DIR}/src/System/*.cpp"
"${KERNEL_SOURCE_DIR}/src/Data/*.cpp"
)
include_directories(${Kernel_Include_Dirs})
add_library(kernel STATIC ${Kernel_SRCS})
### --------------------------------------------------------------------
### Testing
### --------------------------------------------------------------------
include (CTest)
set (GTEST_ROOT "${KERNEL_SOURCE_DIR}/3rdparty/benchmark/googletest/googletest")
set (GTEST_INCLUDE_DIR ${GTEST_ROOT}/include)
set (GTEST_LIBRARIES gtest gtest_main)
set (GTEST_MAIN_LIBRARY gtest_main)
set (GTEST_LIBRARY gtest)
add_subdirectory (3rdparty/benchmark EXCLUDE_FROM_ALL)
add_subdirectory (${GTEST_ROOT} EXCLUDE_FROM_ALL)
find_package (GTest REQUIRED)
enable_testing ()
add_subdirectory (tests)
add_subdirectory (benchmark)