From d0e970a750adc72e3e704f3be4e43ce2cc9a35ed Mon Sep 17 00:00:00 2001
From: Incardona Pietro <incardon@mpi-cbg.de>
Date: Sun, 28 Nov 2021 14:54:14 +0100
Subject: [PATCH] Despite deprecated for now find_package(CUDA) is the only
 macro that gives the possibility to find CUDA runtime library,
 FindCUDAToolkit is an option but A is too recent, B I am not clear if the
 mess of imported target give access to the place of the library in
 configuration and before generation

---
 CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 90bc7b017..a6a60277f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -262,6 +262,7 @@ add_subdirectory (openfpm_io)
 
 if (CUDA_ON_BACKEND STREQUAL "CUDA")
         enable_language(CUDA)
+	find_package(CUDA)
 endif()
 
 file(WRITE cuda_lib "${CUDA_cudart_static_LIBRARY} ${CUDA_cudadevrt_LIBRARY}")
-- 
GitLab