Commit 55cdf9fe authored by Fabian Kosmale's avatar Fabian Kosmale

make unit tests conditional

parent 845fe782
......@@ -9,14 +9,18 @@ set(FIX_AKABEI_VERSION 0 CACHE INT "Akabei’s fix version number" FORCE)
set(AKABEI_VERSION_STRING "${MAJOR_AKABEI_VERSION}.${MINOR_AKABEI_VERSION}.${PATCH_AKABEI_VERSION}.${FIX_AKABEI_VERSION}")
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
if(CMAKE_COMPILER_IS_GNUCXX AND BUILD_COVERAGE)
option(BUILD_TESTS "Builds various tests and examples for Akabei" ON)
if(CMAKE_COMPILER_IS_GNUCXX AND BUILD_COVERAGE AND BUILD_TESTS)
include(CodeCoverage)
setup_target_for_coverage(${PROJECT_NAME}_coverage ctest coverage)
SET(CMAKE_CXX_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
SET(CMAKE_C_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
endif()
enable_testing() # make this conditional?
if(BUILD_TESTS)
enable_testing()
endif()
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
......@@ -60,7 +64,6 @@ set(INCLUDES_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/akabeicore" CACHE "Aka
set(STATE_DIR "/var" CACHE "Directory to store cache data and log files, usually under ${STATE_DIR}/{cache,log,etc...})" STRING)
set(CONFIGURATION_DIR "/etc" CACHE "Directory to store Akabei’s configuration files" STRING)
option(BUILD_TESTS "Builds various tests and examples for Akabei" ON)
CONFIGURE_FILE(
"${CMAKE_CURRENT_SOURCE_DIR}/akabeicoreconfig.h.cmake"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment