Skip to content

Fix CMake warning when looking for rocPRIM #1397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cmake/SetupPackages.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ if (RAJA_ENABLE_HIP)
endif()

if (RAJA_ENABLE_EXTERNAL_ROCPRIM)
include(cmake/thirdparty/FindRocPRIM.cmake)
if (ROCPRIM_FOUND)
find_package(rocPRIM)
if (rocPRIM_FOUND)
blt_import_library(
NAME rocPRIM
INCLUDES ${ROCPRIM_INCLUDE_DIRS}
INCLUDES ${rocPRIM_INCLUDE_DIRS}
TREAT_INCLUDES_AS_SYSTEM ON
EXPORTABLE ON)
else()
Expand Down
29 changes: 0 additions & 29 deletions cmake/thirdparty/FindRocPRIM.cmake

This file was deleted.

54 changes: 54 additions & 0 deletions cmake/thirdparty/FindrocPRIM.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
###############################################################################
# Copyright (c) 2016-22, Lawrence Livermore National Security, LLC
# and other RAJA project contributors. See the RAJA/LICENSE file for details.
#
# SPDX-License-Identifier: (BSD-3-Clause)
###############################################################################

#[=======================================================================[.rst:

FindrocPRIM
-------

Finds the rocPRIM package.

Result Variables
^^^^^^^^^^^^^^^^

This will define the following variables:

``rocPRIM_FOUND``
True if the system has the rocPRIM library.
``rocPRIM_INCLUDE_DIRS``
Include directories needed to use rocPRIM.

Cache Variables
^^^^^^^^^^^^^^^

The following cache variables may also be set:

``rocPRIM_INCLUDE_DIR``
The directory containing ``rocprim.hpp``.

#]=======================================================================]

include (FindPackageHandleStandardArgs)

find_path(rocPRIM_INCLUDE_DIR
NAMES rocprim/rocprim.hpp
HINTS
${ROCPRIM_DIR}/
${HIP_ROOT_DIR}/../
PATH_SUFFIXES
include
rocprim
rocprim/include)

find_package_handle_standard_args(
rocPRIM
DEFAULT_MSG
rocPRIM_INCLUDE_DIR)

if (rocPRIM_FOUND)
set(rocPRIM_INCLUDE_DIRS ${rocPRIM_INCLUDE_DIR})
endif()