Link to Caliper's CMake package (#518)

if HYPRE_WITH_CALIPER is enabled,
then actually find the CMake package
for caliper and link to it.
Without this, include files are not
found and the caliper library is not
properly linked.
This commit is contained in:
Dan Ibanez 2021-11-17 16:28:16 -07:00 committed by GitHub
parent 83989186a2
commit f86b1f7d81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -373,6 +373,11 @@ if (HYPRE_USING_CUDA)
endif ()
endif ()
if (HYPRE_USING_CALIPER)
find_package(caliper REQUIRED)
target_link_libraries(${PROJECT_NAME} PUBLIC caliper)
endif()
# Configure a header file to pass CMake settings to the source code
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/config/HYPRE_config.h.cmake.in"