Skip to content

Commit

Permalink
use find_package() instead of find_dependency()
Browse files Browse the repository at this point in the history
  • Loading branch information
arminms committed Oct 12, 2023
1 parent 5dd4726 commit 58c1d07
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmake/p2rng-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ include ( "${CMAKE_CURRENT_LIST_DIR}/p2rng-targets.cmake" )

foreach(_comp ${p2rng_FIND_COMPONENTS})
if (${_comp} STREQUAL cuda)
find_dependency(CUDAToolkit 11 REQUIRED)
find_package(CUDAToolkit 11 QUIET)
elseif(${_comp} STREQUAL oneapi)
find_dependency(IntelDPCPP REQUIRED)
find_dependency(oneDPL REQUIRED)
find_package(IntelDPCPP QUIET)
find_package(oneDPL QUIET)
elseif(${_comp} STREQUAL rocm)
find_dependency(hip REQUIRED)
find_dependency(rocThrust REQUIRED)
find_package(hip QUIET)
find_package(rocThrust QUIET)
elseif(${_comp} STREQUAL openmp)
find_dependency(OpenMP REQUIRED)
find_dependency(OpenMP)
else()
set(p2rng_FOUND False)
set(p2rng_NOT_FOUND_MESSAGE "Unsupported p2rng target API: ${_comp}")
Expand Down

0 comments on commit 58c1d07

Please sign in to comment.