onqtam | c7aaa96 | 2016-09-10 02:16:57 +0300 | [diff] [blame] | 1 | cmake_minimum_required(VERSION 3.0) |
onqtam | 4a65563 | 2016-05-26 14:20:52 +0300 | [diff] [blame] | 2 | |
| 3 | project(all) |
| 4 | |
| 5 | include(scripts/common.cmake) |
| 6 | |
onqtam | cc9e865 | 2016-08-02 14:23:38 +0300 | [diff] [blame] | 7 | include_directories("doctest/") # needed here so the coverage tools work - otherwise the "../../doctest" relative path fucks up |
| 8 | |
onqtam | 4a65563 | 2016-05-26 14:20:52 +0300 | [diff] [blame] | 9 | # setup coverage stuff only when COVERALLS_SERVICE_NAME is set (usually on travis CI) |
| 10 | if(DEFINED ENV{COVERALLS_SERVICE_NAME}) |
| 11 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/scripts/coveralls-cmake/cmake) |
| 12 | include(Coveralls) |
| 13 | coveralls_turn_on_coverage() |
| 14 | |
| 15 | coveralls_setup("${CMAKE_SOURCE_DIR}/doctest/doctest.h" ON "${CMAKE_SOURCE_DIR}/scripts/coveralls-cmake/cmake") |
onqtam | cc9e865 | 2016-08-02 14:23:38 +0300 | [diff] [blame] | 16 | |
onqtam | b478ca6 | 2016-08-16 07:22:15 +0300 | [diff] [blame] | 17 | add_subdirectory(scripts/code_coverage_source) |
| 18 | |
onqtam | cc9e865 | 2016-08-02 14:23:38 +0300 | [diff] [blame] | 19 | return() |
onqtam | 4a65563 | 2016-05-26 14:20:52 +0300 | [diff] [blame] | 20 | endif() |
| 21 | |
onqtam | b478ca6 | 2016-08-16 07:22:15 +0300 | [diff] [blame] | 22 | add_subdirectory(scripts/code_coverage_source) |
| 23 | |
onqtam | 4a65563 | 2016-05-26 14:20:52 +0300 | [diff] [blame] | 24 | file(GLOB subdir_list "${CMAKE_SOURCE_DIR}/examples/*") |
| 25 | foreach(dir ${subdir_list}) |
| 26 | if(IS_DIRECTORY ${dir}) |
| 27 | get_filename_component(DIRNAME ${dir} NAME) |
| 28 | add_subdirectory(examples/${DIRNAME}) |
| 29 | endif() |
| 30 | endforeach() |