-
Notifications
You must be signed in to change notification settings - Fork 58
/
Copy pathCMakeLists.txt
52 lines (50 loc) · 1.67 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
# Find Kokkos
find_package(Kokkos REQUIRED)
message(STATUS "Found installed Kokkos at ${Kokkos_DIR}")
# Create target executable
set(TEST_APP kp_example)
add_executable(${TEST_APP} main.cpp)
set(LIBS "Kokkos::kokkos;kokkostools")
if(KokkosTools_ENABLE_MPI)
list(APPEND LIBS MPI::MPI_CXX)
endif()
target_link_libraries(${TEST_APP} PRIVATE ${LIBS})
# Create tests
macro(add_kp_test NAME)
add_test(NAME test_kokkos_tools_${NAME}
COMMAND "kp_example" ${ARGN}
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/..")
endmacro()
# TODO: Read profiling results and check if the profiler had succesfully run
# and exported output in expected format, fail the test otherwise.
if(NOT WIN32)
add_kp_test(kernel_timer "kernel-timer")
add_kp_test(memory_events "memory-events")
add_kp_test(memory_usage "memory-usage")
add_kp_test(chrome_tracing "chrome-tracing")
add_kp_test(space_time_stack "space-time-stack")
if(KOKKOSTOOLS_HAS_SYSTEMTAP)
add_kp_test(systemtap_connector "systemtap-connector")
endif()
add_kp_test(highwater_mark "highwater-mark")
if(USE_MPI)
add_kp_test(highwater_mark_mpi "highwater-mark-mpi")
endif()
endif()
if(KokkosTools_ENABLE_CALIPER)
add_kp_test(caliper "caliper" "runtime-report(profile.kokkos)")
endif()
if(KOKKOSTOOLS_HAS_VARIORUM)
add_kp_test(variorum "variorum")
endif()
if(KOKKOSTOOLS_HAS_VTUNE)
add_kp_test(vtune_connector "vtune-connector")
add_kp_test(vtune_focused_connector "vtune-focused-connector")
endif()
if(KOKKOSTOOLS_HAS_NVTX)
add_kp_test(nvtx_connector "nvtx-connector")
add_kp_test(nvtx_focused_connector "nvtx-focused-connector")
endif()
if(KOKKOSTOOLS_HAS_ROCTX)
add_kp_test(roctx_connector "roctx-connector")
endif()