# Copyright (c) 1998 Lawrence Livermore National Security, LLC and other
# HYPRE Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

@PACKAGE_INIT@

include(CMakeFindDependencyMacro)

set(HYPRE_ENABLE_SHARED @HYPRE_ENABLE_SHARED@)
set(HYPRE_ENABLE_BIGINT @HYPRE_ENABLE_BIGINT@)
set(HYPRE_ENABLE_MIXEDINT @HYPRE_ENABLE_MIXEDINT@)
set(HYPRE_ENABLE_SINGLE @HYPRE_ENABLE_SINGLE@)
set(HYPRE_ENABLE_LONG_DOUBLE @HYPRE_ENABLE_LONG_DOUBLE@)
set(HYPRE_ENABLE_COMPLEX @HYPRE_ENABLE_COMPLEX@)
set(HYPRE_ENABLE_HYPRE_BLAS @HYPRE_ENABLE_HYPRE_BLAS@)
set(HYPRE_ENABLE_HYPRE_LAPACK @HYPRE_ENABLE_HYPRE_LAPACK@)
set(HYPRE_ENABLE_PERSISTENT_COMM @HYPRE_ENABLE_PERSISTENT_COMM@)
set(HYPRE_ENABLE_FEI @HYPRE_ENABLE_FEI@)
set(HYPRE_WITH_MPI @HYPRE_WITH_MPI@)
set(HYPRE_WITH_OPENMP @HYPRE_WITH_OPENMP@)
set(HYPRE_WITH_HOPSCOTCH @HYPRE_WITH_HOPSCOTCH@)
set(HYPRE_USING_DSUPERLU @HYPRE_USING_DSUPERLU@)
set(HYPRE_WITH_CALIPER @HYPRE_WITH_CALIPER@)
set(HYPRE_PRINT_ERRORS @HYPRE_PRINT_ERRORS@)
set(HYPRE_TIMING @HYPRE_TIMING@)
set(HYPRE_BUILD_EXAMPLES @HYPRE_BUILD_EXAMPLES@)
set(HYPRE_BUILD_TESTS @HYPRE_BUILD_TESTS@)
set(HYPRE_USING_HOST_MEMORY @HYPRE_USING_HOST_MEMORY@)
set(HYPRE_WITH_CUDA @HYPRE_WITH_CUDA@)
set(HYPRE_WITH_SYCL @HYPRE_WITH_SYCL@)
set(HYPRE_ENABLE_UNIFIED_MEMORY @HYPRE_ENABLE_UNIFIED_MEMORY@)
set(HYPRE_ENABLE_CUDA_STREAMS @HYPRE_ENABLE_CUDA_STREAMS@)
set(HYPRE_ENABLE_CUSPARSE @HYPRE_ENABLE_CUSPARSE@)
set(HYPRE_ENABLE_DEVICE_POOL @HYPRE_ENABLE_DEVICE_POOL@)
set(HYPRE_ENABLE_CUBLAS @HYPRE_ENABLE_CUBLAS@)
set(HYPRE_ENABLE_CURAND @HYPRE_ENABLE_CURAND@)
set(HYPRE_ENABLE_GPU_PROFILING @HYPRE_ENABLE_GPU_PROFILING@)
set(HYPRE_ENABLE_ONEMKLSPARSE @HYPRE_ENABLE_ONEMKLSPARSE@)
set(HYPRE_ENABLE_ONEMKLBLAS @HYPRE_ENABLE_ONEMKLBLAS@)
set(HYPRE_ENABLE_ONEMKLRAND @HYPRE_ENABLE_ONEMKLRAND@)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")

if(NOT HYPRE_ENABLE_HYPRE_BLAS)
  find_dependency(BLAS)
endif()

if(NOT HYPRE_ENABLE_HYPRE_LAPACK)
  find_dependency(LAPACK)
endif()

if(HYPRE_USING_DSUPERLU)
  list(APPEND TPL_LIBRARIES @TPL_DSUPERLU_LIBRARIES@ stdc++)
endif()

if(HYPRE_WITH_MPI)
  enable_language(C)
  find_dependency(MPI @MPI_C_VERSION@ EXACT COMPONENTS C)
endif()

if(HYPRE_WITH_OPENMP)
  find_dependency(OpenMP)
endif()

include("${CMAKE_CURRENT_LIST_DIR}/HYPRETargets.cmake")
