diff options
author | Brad King <brad.king@kitware.com> | 2021-11-04 13:05:55 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-11-04 13:06:39 (GMT) |
commit | 753d861a3bc1ba7e548cf2cf474be503e627f3ca (patch) | |
tree | e356fd7be5dd081b936d8a9e5e0186eac7daf9e3 /Modules | |
parent | 6f995f3825771ecb29e6a5d4e665f8c9c34ff92e (diff) | |
parent | 247f1149e1035f6a9cd95620016364015c34807b (diff) | |
download | CMake-753d861a3bc1ba7e548cf2cf474be503e627f3ca.zip CMake-753d861a3bc1ba7e548cf2cf474be503e627f3ca.tar.gz CMake-753d861a3bc1ba7e548cf2cf474be503e627f3ca.tar.bz2 |
Merge topic 'FindHDF5-avoid-duplicate-library-entries' into release-3.22
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')
-rw-r--r-- | Modules/FindHDF5.cmake | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index caaf7b7..6cadadb 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 "") |