mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-03 12:19:41 -06:00
Merge topic 'FindHDF5-avoid-duplicate-library-entries' into release-3.22
247f1149e1FindHDF5: clear language-specific libraries list before discoveryf56963cf05FindHDF5: clear library output variables at the top of the module Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6698
This commit is contained in:
@@ -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 "")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user