-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
34 lines (34 loc) · 1.32 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
cmake_minimum_required(VERSION 3.16)
project(kokkos_tools_examples)
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/caliper/CMakeLists.txt)
message(FATAL_ERROR """
Submodules have not been checked out, this build will fail. In the root of the repo, please type
git submodule update --init --recursive
""")
endif()
add_subdirectory(kokkos)
cmake_policy(SET CMP0077 NEW)
set(WITH_KOKKOS ON CACHE BOOL "")
set(BUILD_TESTING OFF)
if(Kokkos_ENABLE_CUDA)
set(WITH_CUPTI ON CACHE BOOL "")
set(APEX_WITH_CUDA ON CACHE BOOL "")
else()
set(WITH_CUPTI OFF CACHE BOOL "")
set(APEX_WITH_CUDA OFF CACHE BOOL "")
endif() # Kokkos_ENABLE_CUDA
if(Kokkos_ENABLE_HIP)
set(WITH_GOTCHA OFF CACHE BOOL "")
endif()
set(APEX_WITH_MPI OFF CACHE BOOL "")
set(APEX_WITH_BFD OFF CACHE BOOL "")
set(APEX_WITH_ACTIVEHARMONY OFF CACHE BOOL "")
set(APEX_WITH_OTF2 OFF CACHE BOOL "")
set(APEX_WITH_OMPT OFF CACHE BOOL "")
add_subdirectory(caliper)
add_subdirectory(xpress-apex)
add_subdirectory(examples)
set(KOKKOS_TOOLS_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/build_kk_tools_here)
file(MAKE_DIRECTORY ${KOKKOS_TOOLS_BUILD_DIR})
add_custom_target(make-kokkos-tools ALL COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/kokkos-tools/build-all.sh || true WORKING_DIRECTORY ${KOKKOS_TOOLS_BUILD_DIR})
install(DIRECTORY ${KOKKOS_TOOLS_BUILD_DIR}/ DESTINATION lib64 FILES_MATCHING PATTERN "*.so")