blob: a060a17bcef7aa3a54170098a80818e416e8e265 [file] [log] [blame]
onqtamc7aaa962016-09-10 02:16:57 +03001cmake_minimum_required(VERSION 3.0)
onqtam4a655632016-05-26 14:20:52 +03002
3project(all)
4
5include(scripts/common.cmake)
6
onqtamcc9e8652016-08-02 14:23:38 +03007include_directories("doctest/") # needed here so the coverage tools work - otherwise the "../../doctest" relative path fucks up
8
onqtam4a655632016-05-26 14:20:52 +03009# setup coverage stuff only when COVERALLS_SERVICE_NAME is set (usually on travis CI)
10if(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")
onqtamcc9e8652016-08-02 14:23:38 +030016
onqtamb478ca62016-08-16 07:22:15 +030017 add_subdirectory(scripts/code_coverage_source)
18
onqtamcc9e8652016-08-02 14:23:38 +030019 return()
onqtam4a655632016-05-26 14:20:52 +030020endif()
21
onqtamb478ca62016-08-16 07:22:15 +030022add_subdirectory(scripts/code_coverage_source)
23
onqtam4a655632016-05-26 14:20:52 +030024file(GLOB subdir_list "${CMAKE_SOURCE_DIR}/examples/*")
25foreach(dir ${subdir_list})
26 if(IS_DIRECTORY ${dir})
27 get_filename_component(DIRNAME ${dir} NAME)
28 add_subdirectory(examples/${DIRNAME})
29 endif()
30endforeach()