-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install: CMake Config & Targets (#217)
* Install: CMake Config & Targets Install the CMake package files for consumption of CMake targets in downstream projects. We will in the future expose public headers for downstream projects as well that will help us to compile templated classes, such as particle containers, targeted in the downstream repo instead of collecting all known usage here in upstream. * Update Stub Files --------- Co-authored-by: ax3l <[email protected]>
- Loading branch information
Showing
9 changed files
with
75 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
@PACKAGE_INIT@ | ||
|
||
# only add PUBLIC dependencies as well | ||
# https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#creating-a-package-configuration-file | ||
include(CMakeFindDependencyMacro) | ||
|
||
# Search in <PackageName>_ROOT: | ||
# https://cmake.org/cmake/help/v3.12/policy/CMP0074.html | ||
if(POLICY CMP0074) | ||
cmake_policy(SET CMP0074 NEW) | ||
endif() | ||
|
||
# General options | ||
set(pyAMReX_SPACEDIM @AMReX_SPACEDIM@) | ||
set(_search_amrex_dim) | ||
foreach(D IN LISTS AMReX_SPACEDIM) | ||
set(pyAMReX_${D}D_FOUND ON) | ||
set(_search_amrex_dim ${_search_amrex_dim} "${D}D") | ||
endforeach() | ||
|
||
find_dependency(AMReX COMPONENTS ${_search_amrex_dim}) | ||
|
||
set(pyAMReX_MPI @AMReX_MPI@) | ||
set(pyAMReX_OMP @AMReX_OMP@) | ||
set(pyAMReX_CUDA @AMReX_CUDA@) | ||
set(pyAMReX_SYCL @AMReX_SYCL@) | ||
set(pyAMReX_HIP @AMReX_HIP@) | ||
set(pyAMReX_GPU_BACKEND @AMReX_GPU_BACKEND@) | ||
|
||
# define central pyAMReX::pyAMReX_${D}d targets | ||
include("${CMAKE_CURRENT_LIST_DIR}/pyAMReXTargets.cmake") | ||
|
||
# check if components are fulfilled and set pyAMReX_<COMPONENT>_FOUND vars | ||
foreach(comp ${pyAMReX_FIND_COMPONENTS}) | ||
if(NOT pyAMReX_${comp}_FOUND) | ||
if(pyAMReX_FIND_REQUIRED_${comp}) | ||
set(pyAMReX_FOUND FALSE) | ||
endif() | ||
endif() | ||
endforeach() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters