summaryrefslogtreecommitdiff
path: root/Modules/FindHDF5.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-11-04 13:05:55 +0000
committerKitware Robot <kwrobot@kitware.com>2021-11-04 09:06:40 -0400
commite0bb15abfd759b4b6c185bf306ab9cc9e74e0673 (patch)
treea96beeeaf49547f955c464ac2541d1b93187f388 /Modules/FindHDF5.cmake
parente602d177c6366364da2559abbed039bb62274e17 (diff)
parent247f1149e1035f6a9cd95620016364015c34807b (diff)
downloadcmake-e0bb15abfd759b4b6c185bf306ab9cc9e74e0673.tar.gz
Merge topic 'FindHDF5-avoid-duplicate-library-entries'
247f1149e1 FindHDF5: clear language-specific libraries list before discovery f56963cf05 FindHDF5: clear library output variables at the top of the module Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6698
Diffstat (limited to 'Modules/FindHDF5.cmake')
-rw-r--r--Modules/FindHDF5.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 3410e4ece3..ce62d06ba1 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -161,6 +161,8 @@ include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
# scope somewhere else. We can't rely on it because different components may
# have been requested for this call.
set(HDF5_FOUND OFF)
+set(HDF5_LIBRARIES)
+set(HDF5_HL_LIBRARIES)
# List of the valid HDF5 components
set(HDF5_VALID_LANGUAGE_BINDINGS C CXX Fortran)
@@ -586,6 +588,9 @@ if(NOT HDF5_FOUND)
set(HDF5_COMPILER_NO_INTERROGATE TRUE)
# Only search for languages we've enabled
foreach(_lang IN LISTS HDF5_LANGUAGE_BINDINGS)
+ set(HDF5_${_lang}_LIBRARIES)
+ set(HDF5_${_lang}_HL_LIBRARIES)
+
# First check to see if our regular compiler is one of wrappers
if(_lang STREQUAL "C")
_HDF5_test_regular_compiler_C(
@@ -811,6 +816,9 @@ if( NOT HDF5_FOUND )
endif()
foreach(_lang IN LISTS HDF5_LANGUAGE_BINDINGS)
+ set(HDF5_${_lang}_LIBRARIES)
+ set(HDF5_${_lang}_HL_LIBRARIES)
+
# The "main" library.
set(_hdf5_main_library "")