cmake_minimum_required(VERSION 3.28) project(cuda_hello LANGUAGES CUDA CXX) add_executable(cuda_hello hello.cu) # -Wpedantic causes warnings due to nvcc emitting non-standard (gcc-specific) # host code. # https://stackoverflow.com/questions/31000996/warning-when-compiling-cu-with-wpedantic-style-of-line-directive-is-a-gcc-ex target_compile_options(cuda_hello PRIVATE -Wall -Wextra -Wno-pedantic)