about summary refs log tree commit diff
path: root/pkgs/development/cuda-modules/saxpy/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/cuda-modules/saxpy/CMakeLists.txt')
-rw-r--r--pkgs/development/cuda-modules/saxpy/CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkgs/development/cuda-modules/saxpy/CMakeLists.txt b/pkgs/development/cuda-modules/saxpy/CMakeLists.txt
new file mode 100644
index 0000000000000..a6954e6e8bee2
--- /dev/null
+++ b/pkgs/development/cuda-modules/saxpy/CMakeLists.txt
@@ -0,0 +1,12 @@
+cmake_minimum_required(VERSION 3.25)
+project(saxpy LANGUAGES CXX CUDA)
+
+find_package(CUDAToolkit REQUIRED COMPONENTS cudart cublas)
+
+add_executable(saxpy saxpy.cu)
+target_link_libraries(saxpy PUBLIC CUDA::cublas CUDA::cudart m)
+target_compile_features(saxpy PRIVATE cxx_std_14)
+target_compile_options(saxpy PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:
+                                     --expt-relaxed-constexpr>)
+
+install(TARGETS saxpy)