forked from desul/desul
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
43 lines (34 loc) · 1.31 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
cmake_minimum_required (VERSION 3.10)
project(desul
LANGUAGES CXX
VERSION 0.1.0)
# Default to C++14 if not set TODO: check to ensure this is the minimum
if (NOT BLT_CXX_STD)
set(BLT_CXX_STD "c++14" CACHE STRING "")
endif()
set(DESUL_DEPENDENT_OPTIONS
ENABLE_OPENMP
ENABLE_CUDA
ENABLE_HIP
ENABLE_SYCL
ENABLE_TESTS
)
foreach (option ${DESUL_DEPENDENT_OPTIONS})
if (${DESUL_${option}})
if (NOT ${option})
message(FATAL_ERROR "DESUL_${option} set to ON, but ${option} is OFF. Please set ${option} to ON enable this feature.")
endif ()
endif ()
endforeach ()
include(CMakeDependentOption)
option(ENABLE_SYCL "Enable SYCL support" OFF) # option does not actually yet exist on the BLT side
cmake_dependent_option(DESUL_ENABLE_CUDA "Build with CUDA support" ON "ENABLE_CUDA" OFF)
cmake_dependent_option(DESUL_ENABLE_HIP "Build with HIP support" ON "ENABLE_HIP" OFF)
cmake_dependent_option(DESUL_ENABLE_OPENMP "Build with OpenMP support" ON "ENABLE_OPENMP" OFF)
cmake_dependent_option(DESUL_ENABLE_SYCL "Build with SYCL support" ON "ENABLE_SYCL" OFF)
cmake_dependent_option(DESUL_ENABLE_TESTS "Build tests" ON "ENABLE_TESTS" OFF)
include(cmake/blt_boilerplate.cmake)
add_subdirectory(atomics)
install(FILES
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/desulConfig.cmake"
DESTINATION lib/cmake/desul)