-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
64 lines (51 loc) · 1.76 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
53
54
55
56
57
58
59
60
61
62
63
64
cmake_minimum_required(VERSION 3.20)
project(cusan-tests)
set(CUSAN_PATH "${PROJECT_SOURCE_DIR}/cusan/install" CACHE STRING "Path to CuSan installation")
if(NOT IS_DIRECTORY ${CUSAN_PATH})
if(DEFINED ENV{CUSAN_PATH})
set(CUSAN_PATH $ENV{CUSAN_PATH} CACHE STRING "" FORCE)
endif()
endif()
if(NOT DEFINED CUSAN_PATH OR NOT IS_DIRECTORY ${CUSAN_PATH})
message(WARNING "Path to cusan installation not set correctly (${CUSAN_PATH})")
endif()
message(STATUS "Path to cusan installation is set to ${CUSAN_PATH}")
find_package(MPI REQUIRED)
option(CUSAN_TEST_USE_TSAN_WORKAROUNDS "Enable environment flags for making TSan work on HPC cluster" ON)
mark_as_advanced(CUSAN_TEST_USE_TSAN_WORKAROUNDS)
# Not so portable, but suffices
find_program(cusan_mpicxx
NAMES cusan-mpic++
PATHS ${CUSAN_PATH} ${CUSAN_PATH}/bin
NO_DEFAULT_PATH
)
find_program(cusan_mpicc
NAME cusan-mpicc
PATHS ${CUSAN_PATH} ${CUSAN_PATH}/bin
NO_DEFAULT_PATH
)
find_library(lib_cusan_runtime
NAMES CusanRuntime
PATHS ${CUSAN_PATH}/lib ${CUSAN_PATH}
NO_DEFAULT_PATH
)
find_library(lib_cusan_interceptor
NAMES CusanMPIInterceptor
PATHS ${CUSAN_PATH}/lib ${CUSAN_PATH}
NO_DEFAULT_PATH
)
find_program(must_run
mustrun
PATHS ${MUST_PATH} ${MUST_PATH}/bin ${PROJECT_SOURCE_DIR}/must-tsan/install/bin
NO_DEFAULT_PATH
)
message(STATUS "cusan mpicc wrapper is set to ${cusan_mpicc}")
message(STATUS "cusan mpicxx wrapper is set to ${cusan_mpicxx}")
message(STATUS "cusan lib is set to ${lib_cusan_runtime}")
message(STATUS "cusan interceptor lib is set to ${lib_cusan_interceptor}")
message(STATUS "MUST mustrun is set to ${must_run}")
enable_testing()
add_subdirectory(support)
add_subdirectory(testsuite)
add_subdirectory(jacobi/scripts)
add_subdirectory(tealeaf/scripts)