From ba42ea8ce38688c9014c2492866a361b057b5654 Mon Sep 17 00:00:00 2001 From: Sam Reeve <6740307+streeve@users.noreply.github.com> Date: Fri, 2 Feb 2024 09:37:30 -0500 Subject: [PATCH] cmake: add cuda deps for downstream packages (#1062) Added find_dependency calls which mirror find_package in cmake/HYPRE_SetupCUDAToolkit.cmake. Without this the downstream app has to add the same dependency paths as the hypre build --- src/config/HYPREConfig.cmake.in | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/config/HYPREConfig.cmake.in b/src/config/HYPREConfig.cmake.in index fb6b437d5e..abf6a99bfd 100644 --- a/src/config/HYPREConfig.cmake.in +++ b/src/config/HYPREConfig.cmake.in @@ -73,4 +73,11 @@ if(HYPRE_WITH_OPENMP) find_dependency(OpenMP) endif() +if(HYPRE_WITH_CUDA) + find_dependency(CUDA REQUIRED) + if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.17) + find_dependency(CUDAToolkit REQUIRED) + endif() +endif() + include("${CMAKE_CURRENT_LIST_DIR}/HYPRETargets.cmake")