2020-04-17 20:21:40 +02:00
|
|
|
cmake_minimum_required(VERSION 3.2)
|
2016-05-16 22:14:06 +02:00
|
|
|
|
2020-04-17 20:20:36 +02:00
|
|
|
project(DOtherSide)
|
|
|
|
|
2016-05-16 22:14:06 +02:00
|
|
|
# Add additional source path for cmake
|
2019-11-18 00:05:58 +01:00
|
|
|
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/)
|
2016-05-16 22:14:06 +02:00
|
|
|
|
|
|
|
# Add strict warning checking for C++
|
2016-01-29 22:27:55 +01:00
|
|
|
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
2019-11-18 00:05:58 +01:00
|
|
|
# Add Coverage option
|
|
|
|
option(ENABLE_COVERAGE "Enable coverage" OFF)
|
2016-05-16 22:14:06 +02:00
|
|
|
|
2019-11-18 00:05:58 +01:00
|
|
|
add_compile_options(-Wall -Wno-long-long -pedantic)
|
2016-05-16 22:14:06 +02:00
|
|
|
|
2019-11-18 00:05:58 +01:00
|
|
|
if (ENABLE_COVERAGE)
|
|
|
|
message(STATUS "Enabling coverage")
|
|
|
|
set(CMAKE_BUILD_TYPE Debug)
|
|
|
|
add_compile_options(-g -O0 --coverage)
|
2019-11-19 22:42:33 +01:00
|
|
|
add_link_options(--coverage)
|
2019-11-18 00:05:58 +01:00
|
|
|
endif()
|
|
|
|
endif()
|
2016-05-16 22:14:06 +02:00
|
|
|
|
2016-07-05 17:58:36 +02:00
|
|
|
add_subdirectory(doc)
|
2015-11-23 21:33:17 +01:00
|
|
|
add_subdirectory(lib)
|
2015-09-19 19:13:08 +02:00
|
|
|
add_subdirectory(test)
|