mirror of
https://github.com/NVIDIA/cuda-samples.git
synced 2026-06-04 00:06:52 +08:00
This is the release of the CUDA 13.3 samples, which include additions for CUDA Tile C++, and updated CCCL and Python samples.
30 lines
867 B
CMake
30 lines
867 B
CMake
cmake_minimum_required(VERSION 3.20)
|
|
|
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/Modules")
|
|
|
|
project(tileSpMV LANGUAGES C CXX CUDA)
|
|
|
|
find_package(CUDAToolkit REQUIRED)
|
|
|
|
set(CMAKE_CUDA_ARCHITECTURES 80 86 87 89 90 100 110 120)
|
|
|
|
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --enable-tile")
|
|
|
|
if(ENABLE_CUDA_DEBUG)
|
|
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -G")
|
|
else()
|
|
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -lineinfo") # add line information to all builds for debug tools (exclusive to -G option)
|
|
endif()
|
|
|
|
# Include directories and libraries
|
|
include_directories(../../../Common)
|
|
|
|
# Source file
|
|
add_executable(tileSpMV tileSpMV.cu)
|
|
|
|
target_compile_features(tileSpMV PRIVATE cxx_std_20 cuda_std_20)
|
|
|
|
# Include installation configuration
|
|
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake)
|
|
setup_samples_install()
|