Update to add Cuda to build system

This commit is contained in:
Alex Selimov 2025-04-15 14:10:01 -04:00
parent 8408036078
commit 68f8b02f0a
8 changed files with 120 additions and 17 deletions

View file

@ -1,17 +1,16 @@
project(${CMAKE_PROJECT_NAME}_lib)
project(${CMAKE_PROJECT_NAME}_lib CUDA CXX)
set(HEADER_FILES
./test.h
)
set(SOURCE_FILES
./test.cpp
)
if (EXISTS ${SOURCE_FILES})
# The library contains header and source files.
add_library(${CMAKE_PROJECT_NAME}_lib STATIC
${SOURCE_FILES}
${HEADER_FILES}
)
else()
# The library only contains header files.
add_library(${CMAKE_PROJECT_NAME}_lib INTERFACE)
endif()
# The library contains header and source files.
add_library(${CMAKE_PROJECT_NAME}_lib
${SOURCE_FILES}
${HEADER_FILES}
)
target_include_directories(${CMAKE_PROJECT_NAME}_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})