Skip to content
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

Retain the original path to Kokkos and ArborX #723

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
14 changes: 12 additions & 2 deletions cmake/CabanaConfig.cmakein
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,24 @@
include(CMakeFindDependencyMacro)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}" )
list(APPEND CMAKE_PREFIX_PATH @CMAKE_PREFIX_PATH@)
find_dependency(Kokkos REQUIRED)
find_package(Kokkos QUIET)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
find_package(Kokkos QUIET)
find_dependency(Kokkos)

find_dependency handles QUIET automatically.

if(NOT Kokkos_FOUND)
# If Kokkos was not found, try to use Kokkos used when building Cabana
set(Kokkos_DIR @Kokkos_DIR@)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
set(Kokkos_DIR @Kokkos_DIR@)
if(NOT Kokkos_DIR)
set(Kokkos_DIR @Kokkos_DIR@)
endif()

So the user can still overwrite it if needed.

find_dependency(Kokkos)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
find_dependency(Kokkos)
find_dependency(Kokkos REQUIRED)

endif()
set(Cabana_ENABLE_MPI @Cabana_ENABLE_MPI@)
if(Cabana_ENABLE_MPI)
find_dependency(MPI REQUIRED CXX)
endif()
set(Cabana_ENABLE_ARBORX @Cabana_ENABLE_ARBORX@)
if(Cabana_ENABLE_ARBORX)
find_dependency(ArborX REQUIRED)
find_package(ArborX QUIET)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
find_package(ArborX QUIET)
find_dependency(ArborX)

if(NOT ArborX_FOUND)
# If ArborX was not found, try to use ArborX used when building Cabana
set(ArborX_DIR @ArborX_DIR@)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
set(ArborX_DIR @ArborX_DIR@)
if(NOT ArborX_DIR)
set(ArborX_DIR @ArborX_DIR@)
endif()

find_dependency(ArborX)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
find_dependency(ArborX)
find_dependency(ArborX REQUIRED)

endif()
endif()
set(Cabana_ENABLE_GRID @Cabana_ENABLE_GRID@)
set(Cabana_ENABLE_CAJITA @Cabana_ENABLE_CAJITA@) # FIXME: remove in next release
Expand Down
Loading