-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
40 lines (31 loc) · 844 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
39
40
cmake_minimum_required(VERSION 2.8)
include(cmake/Arduino.cmake)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
project(rand C CXX)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
# Options
option(SAMPLES "Samples" OFF)
option(TESTS "Tests" OFF)
option(SIMULATOR "Simulator" OFF)
option(DOC "Documentation" OFF)
option(SERIAL_TARGETS "Serial Targets" OFF)
option(SIZE_TARGETS "Size Targets" OFF)
include_directories(src src/lib)
avr_include_directories(src src/lib)
add_subdirectory(src)
if (SAMPLES)
add_subdirectory(samples)
endif ()
if (TESTS)
add_subdirectory(test)
endif ()
if (SIMULATOR)
add_subdirectory(test/randsim)
endif ()
if (DOC)
include(cmake/Doxygen.cmake)
endif()
if (SERIAL_TARGETS)
setup_serial_targets()
endif ()