You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
419 B
15 lines
419 B
cmake_minimum_required(VERSION 3.30)
|
|
project(Unity CUDA)
|
|
|
|
set(CMAKE_UNITY_BUILD 1)
|
|
|
|
add_library(UnityObjects STATIC a.cu b.cu)
|
|
|
|
add_executable(CudaOnlyUnity main.cu)
|
|
target_link_libraries(CudaOnlyUnity PRIVATE UnityObjects)
|
|
|
|
if(APPLE)
|
|
# Help the static cuda runtime find the driver (libcuda.dyllib) at runtime.
|
|
set_property(TARGET CudaOnlyUnity PROPERTY BUILD_RPATH ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES})
|
|
endif()
|