cmake cuda

zJanly發表於2024-08-04
cmake_minimum_required(VERSION 3.10)
project(untitled3)

enable_language(CUDA)
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -G")

set(CMAKE_VERBOSE_MAKEFILE ON)

set(SRC_DIR "${CMAKE_SOURCE_DIR}")
file(GLOB SRC_FILES "${SRC_DIR}/*.c" "${SRC_DIR}/*.cpp" "${SRC_DIR}/*.cc" "${SRC_DIR}/*.cxx" "${SRC_DIR}/*.cu")

add_executable(${PROJECT_NAME} ${SRC_FILES})