hardly | b1e7e14 | 2014-08-06 00:43:51 +0300 | [diff] [blame] | 1 | cmake_minimum_required(VERSION 2.8)
|
| 2 |
|
| 3 | project(all)
|
| 4 |
|
hardly | b1e7e14 | 2014-08-06 00:43:51 +0300 | [diff] [blame] | 5 | include(CMakeParseArguments)
|
onqtam | 222ecad | 2016-03-15 11:54:37 +0200 | [diff] [blame^] | 6 | include(scripts/common.cmake)
|
hardly | b1e7e14 | 2014-08-06 00:43:51 +0300 | [diff] [blame] | 7 |
|
| 8 | # when on Travis CI force 64 bit for gcc 4.4 under OSX because -m32 fails
|
| 9 | # saying that it cannot find 'std::exception' as a symbol (or others) for i386
|
| 10 | if(DEFINED ENV{TRAVIS} AND APPLE AND CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.5)
|
| 11 | add_compiler_flags(-m64)
|
| 12 | endif()
|
| 13 |
|
| 14 | # setup coverage stuff only when COVERALLS_SERVICE_NAME is set (usually on travis CI)
|
| 15 | if(DEFINED ENV{COVERALLS_SERVICE_NAME})
|
| 16 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/scripts/coveralls-cmake/cmake)
|
| 17 | include(Coveralls)
|
| 18 | coveralls_turn_on_coverage()
|
| 19 |
|
| 20 | coveralls_setup("${CMAKE_SOURCE_DIR}/doctest/doctest.h" ON "${CMAKE_SOURCE_DIR}/scripts/coveralls-cmake/cmake")
|
| 21 | endif()
|
| 22 |
|
hardly | b1e7e14 | 2014-08-06 00:43:51 +0300 | [diff] [blame] | 23 | include_directories("doctest/") # needed here so the coverage tools work - otherwise the "../../doctest" relative path fucks up
|
| 24 |
|
| 25 | file(GLOB subdir_list "${CMAKE_SOURCE_DIR}/examples/*")
|
| 26 | foreach(dir ${subdir_list})
|
| 27 | if(IS_DIRECTORY ${dir})
|
| 28 | get_filename_component(DIRNAME ${dir} NAME)
|
| 29 | add_subdirectory(examples/${DIRNAME})
|
| 30 | endif()
|
| 31 | endforeach()
|