1# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced 2# at the Lawrence Livermore National Laboratory. All Rights reserved. See files 3# LICENSE and NOTICE for details. LLNL-CODE-806117. 4# 5# This file is part of the MFEM library. For more information and source code 6# availability visit https://mfem.org. 7# 8# MFEM is free software; you can redistribute it and/or modify it under the 9# terms of the BSD-3 license. We welcome feedback and contributions, see file 10# CONTRIBUTING.md for details. 11 12# Defines the following variables: 13# - AMGX_FOUND 14# - AMGX_LIBRARIES 15# - AMGX_INCLUDE_DIRS 16 17include(MfemCmakeUtilities) 18set(AMGX_REQUIRED_LIBRARIES cusparse cusolver cublas cublasLt nvToolsExt) 19mfem_find_package(AMGX AMGX AMGX_DIR "include" "amgx_c.h" "lib" "amgx" 20 "Paths to headers required by AMGX." "Libraries required by AMGX.") 21# Make sure the library location is locked down 22foreach(lib ${AMGX_REQUIRED_LIBRARIES}) 23 list(APPEND AMGX_LIBRARIES ${CUDA_TOOLKIT_ROOT_DIR}/lib64/lib${lib}${CMAKE_SHARED_LIBRARY_SUFFIX}) 24endforeach() 25