-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
38 lines (29 loc) · 1.16 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
cmake_minimum_required(VERSION 3.28)
project(graphy CXX CUDA)
# Me later...
# The execution context is needed as graph memory allocation can cross
# boundaries...
# So for the moment keep this in a separate branch
# Other TODO: perform prefetch and usage hints on Unified memory
# TODO: put CUDA backend behind a feature flag
# TODO: fix the SYCL bug and have CUDA and SYCL backend coexisting in the same
# project ;D
# TODO: Add an ExecutionContext class for device capability query
# for the moment have something like ExecutionContext::DisplaySpecs()
# and give the name of the backend, driver version, CPU or GPU
# etc...
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CUDA_STANDARD 20)
set(CMAKE_CUDA_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_COLOR_DIAGNOSTICS ON)
include(CheckIPOSupported)
check_ipo_supported(RESULT lto_supported)
add_executable(example)
target_sources(example PRIVATE mst.cu graph.cu example.cu)
set_target_properties(example PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
if(lto_supported)
set_target_properties(example PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE)
endif()