# ----------------------------------------------------------------------------- # Programmer(s): Cody J. Balos @ LLNL # ----------------------------------------------------------------------------- # SUNDIALS Copyright Start # Copyright (c) 2002-2025, Lawrence Livermore National Security # and Southern Methodist University. # All rights reserved. # # See the top-level LICENSE and NOTICE files for details. # # SPDX-License-Identifier: BSD-3-Clause # SUNDIALS Copyright End # ----------------------------------------------------------------------------- # Module to find and setup Trilinos correctly. # Created from the SundialsTPL.cmake template. # All SUNDIALS modules that find and setup a TPL must: # # 1. Check to make sure the SUNDIALS configuration and the TPL is compatible. # 2. Find the TPL. # 3. Check if the TPL works with SUNDIALS, UNLESS the override option # TPL_WORKS is TRUE - in this case the tests should not be performed and it # should be assumed that the TPL works with SUNDIALS. # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- # Section 1: Include guard # ----------------------------------------------------------------------------- include_guard(GLOBAL) # ----------------------------------------------------------------------------- # Section 2: Check to make sure options are compatible # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- # Section 3: Find the TPL # ----------------------------------------------------------------------------- # Find Trilinos find_package( Trilinos REQUIRED COMPONENTS Tpetra HINTS "${Trilinos_DIR}/lib/cmake/Trilinos" "${Trilinos_DIR}") message(STATUS "Trilinos Libraries: ${Trilinos_LIBRARIES}") message(STATUS "Trilinos Includes: ${Trilinos_INCLUDE_DIRS}") message(STATUS "Trilinos Devices: ${Kokkos_DEVICES}") # ----------------------------------------------------------------------------- # Section 4: Test the TPL # ----------------------------------------------------------------------------- # Does not currently work with Trilinos imported targets due to an error from # evaluating generator expression: $ may only be used with # binary targets to specify link libraries, link directories, link options and # link depends.