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:40 (GMT) |
commit | e0bb15abfd759b4b6c185bf306ab9cc9e74e0673 (patch) | |
tree | a96beeeaf49547f955c464ac2541d1b93187f388 /Modules/FindHDF5.cmake | |
parent | e602d177c6366364da2559abbed039bb62274e17 (diff) | |
parent | 247f1149e1035f6a9cd95620016364015c34807b (diff) | |
download | CMake-e0bb15abfd759b4b6c185bf306ab9cc9e74e0673.zip CMake-e0bb15abfd759b4b6c185bf306ab9cc9e74e0673.tar.gz CMake-e0bb15abfd759b4b6c185bf306ab9cc9e74e0673.tar.bz2 |
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.cmake | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index 3410e4e..ce62d06 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 "") |