-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
48 lines (36 loc) · 1.04 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
47
cmake_minimum_required(VERSION 2.8)
project("Staccato C++ task scheduler")
option(STACCATO_BUILD_EXAMPLES "Build example programs" OFF)
option(STACCATO_BUILD_TESTS "Build all tests" OFF)
if (NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE Release)
endif()
if (CMAKE_BUILD_TYPE MATCHES Debug)
message("Debug build.")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra")
add_definitions(-DSTACCATO_DEBUG=1)
set(CMAKE_VERBOSE_MAKEFILE TRUE)
elseif (CMAKE_BUILD_TYPE MATCHES Release)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -g")
message("Release build.")
endif ()
set(CMAKE_CXX_STANDARD 11)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
set(HEADERS
include/scheduler.hpp
include/task.hpp
include/debug.hpp
include/task_deque.hpp
include/lifo_allocator.hpp
include/worker.hpp
include/utils.hpp
include/counter.hpp
)
install(
FILES ${HEADERS}
DESTINATION include/staccato
)
# enable_testing()
add_subdirectory(examples/01-class)
# add_subdirectory(tests)