From 247f1149e1035f6a9cd95620016364015c34807b Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 3 Nov 2021 13:24:30 -0400 Subject: FindHDF5: clear language-specific libraries list before discovery --- Modules/FindHDF5.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index ce08728..bda392d 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -588,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( @@ -813,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 "") -- cgit v0.12