forked from snaewe/loki-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
45 lines (33 loc) · 1.18 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
# -------------------------------------------------------------
# file: CMakeLists.txt
# -------------------------------------------------------------
# -------------------------------------------------------------
# Created October 11, 2017 by Perkins
# Last Change: 2017-10-11 10:47:40 d3g096
# -------------------------------------------------------------
cmake_minimum_required (VERSION 2.8.8)
project(Loki)
enable_language(CXX)
# make building and running tests optional
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/include)
add_subdirectory(src)
add_subdirectory(include)
# -------------------------------------------------------------
# loki_add_run_test
# Add a test that only check the return status (0=pass)
# -------------------------------------------------------------
if (NOT LOKI_TEST_TIMEOUT)
set(LOKI_TEST_TIMEOUT 15.0)
endif()
function(loki_add_run_test test_name test_target)
add_test("${test_name}" "${test_target}")
set_tests_properties("${test_name}"
PROPERTIES
TIMEOUT ${LOKI_TEST_TIMEOUT}
)
endfunction(loki_add_run_test)
option(LOKI_ENABLE_TESTING "Enable tests" ON)
if (LOKI_ENABLE_TESTING)
enable_testing()
add_subdirectory(test)
endif()