-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathCMakeLists.txt
52 lines (41 loc) · 1.02 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
#
# project information
#
project("radiomics-tools" LANGUAGES CXX)
set (CMAKE_CXX_STANDARD 11)
#------------------------------------------------
# ITK
#------------------------------------------------
find_package(ITK)
if(ITK_FOUND)
include(${ITK_USE_FILE})
else()
message(FATAL_ERROR
"Cannot build Application without ITK. Please set ITK_DIR.")
endif()
# choose new behaviour for CMP0042
# see http://www.cmake.org/cmake/help/v3.0/policy/CMP0042.html for more details
if (POLICY CMP0042)
cmake_policy(SET CMP0042 NEW)
endif ()
#
# cmake configuration
#
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/externals/CMake-codecov/cmake" ${CMAKE_MODULE_PATH})
enable_testing()
# enable code coverage
if(EXISTS "${CMAKE_SOURCE_DIR}/externals/CMake-codecov/cmake")
find_package(codecov)
set(codecov_FOUND True)
else ()
set(codecov_FOUND False)
endif ()
#
# recurse into subdirectories
#
add_subdirectory(Tools)
# evaluate coverage
if(codecov_FOUND)
coverage_evaluate()
endif()