Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 9f8b64f4 authored by PRUVOST Florent's avatar PRUVOST Florent
Browse files

CHAMELEONConfig.cmake.in: add CUDA and CUBLAS target after Find CUDA

parent 8ca4b4b9
No related branches found
No related tags found
No related merge requests found
...@@ -36,6 +36,24 @@ if (@CHAMELEON_USE_MPI@) ...@@ -36,6 +36,24 @@ if (@CHAMELEON_USE_MPI@)
endif() endif()
if (@CHAMELEON_USE_CUDA@ AND NOT @CHAMELEON_SIMULATION@) if (@CHAMELEON_USE_CUDA@ AND NOT @CHAMELEON_SIMULATION@)
find_dependency(CUDA REQUIRED) find_dependency(CUDA REQUIRED)
if ( CUDA_FOUND )
if (NOT TARGET CUDA::CUDA)
add_library(CUDA::CUDA INTERFACE IMPORTED)
if (CUDA_INCLUDE_DIRS)
set_target_properties(CUDA::CUDA PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CUDA_INCLUDE_DIRS}")
endif()
if (CUDA_LIBRARIES)
set_target_properties(CUDA::CUDA PROPERTIES INTERFACE_LINK_LIBRARIES "${CUDA_LIBRARIES}")
endif()
if (NOT TARGET CUDA::CUBLAS)
add_library(CUDA::CUBLAS INTERFACE IMPORTED)
if (CUDA_CUBLAS_LIBRARIES)
set_target_properties(CUDA::CUBLAS PROPERTIES INTERFACE_LINK_LIBRARIES "${CUDA_CUBLAS_LIBRARIES}")
endif()
target_link_libraries(CUDA::CUBLAS INTERFACE CUDA::CUDA)
endif()
endif()
endif()
endif() endif()
# add the targets file # add the targets file
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment