forked from RWTH-HPC/CMake-codecov
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
52 lines (37 loc) · 929 Bytes
/
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
# This file is part of CMake-codecov.
#
# Copyright (c)
# 2015-2020 RWTH Aachen University, Federal Republic of Germany
#
# See the LICENSE file in the package base directory for details
#
# Written by Alexander Haase, alexander.haase@rwth-aachen.de
#
# minimum required cmake version
cmake_minimum_required(VERSION 2.8.12)
# 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 (POLICY CMP0042)
#
# project information
#
if (${CMAKE_MAJOR_VERSION} EQUAL 3)
project("test" LANGUAGES C Fortran)
else ()
project("test" C Fortran)
endif ()
#
# cmake configuration
#
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
enable_testing()
# enable code coverage
find_package(codecov)
#
# recurse into subdirectories
#
add_subdirectory(src)
# evaluate coverage
coverage_evaluate()