forked from kempj/hpxMP
-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
33 lines (29 loc) · 930 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
# Copyright (c) 2018 Tianyi Zhang
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
set(tests
get_thread_num
parallel_multi
task_tree_simple
task_untied
)
enable_testing()
macro(do_test name)
add_test(${name} ${name})
set_target_properties(${name} PROPERTIES
CXX_STANDARD 11
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS OFF
)
set_tests_properties(${name} PROPERTIES
ENVIRONMENT "LD_PRELOAD=${PROJECT_BINARY_DIR}/libhpxmp.so;OMP_NUM_THREADS=2"
TIMEOUT 50
)
endmacro(do_test)
foreach(test ${tests})
set(sources ${test}.cpp)
add_executable(tests.omp.regression.${test} ${sources})
do_test(tests.omp.regression.${test})
endforeach()