mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-14 00:43:24 +00:00
13 lines
431 B
CMake
13 lines
431 B
CMake
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)
|