-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathCMakeLists.txt
37 lines (28 loc) · 1.09 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
cmake_minimum_required(VERSION 2.8)
project(StateMachine)
# Set output directories
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/../bin")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/../lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/../lib")
option(ENABLE_DOC "Generates the documentation target" OFF)
option(ENABLE_COVERAGE "Generates the coverage build" OFF)
option(ENABLE_TESTING "Turns on testing" OFF)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
include_directories(include)
# Enable code coverage with -DENABLE_COVERAGE=1
if(ENABLE_COVERAGE)
set(CMAKE_BUILD_TYPE "Coverage")
include(CodeCoverage)
setup_target_for_coverage(${PROJECT_NAME}_coverage ${PROJECT_NAME}_test coverage)
endif()
# Enable documentation with -DENABLE_DOC=1
if(ENABLE_DOC)
add_subdirectory(doc)
endif()
# Enable code testing with -DENABLE_TESTING=1
if(ENABLE_TESTING OR ENABLE_COVERAGE)
enable_testing() #
add_subdirectory(test)
endif()
add_subdirectory(src)