Commit 77f6d22a authored by Brad King's avatar Brad King
Browse files

FindHDF5: Use keywords in find_library calls

Clarify the purpose of each argument.
parent 3d5ad723
...@@ -516,7 +516,10 @@ if(NOT HDF5_FOUND AND NOT HDF5_ROOT) ...@@ -516,7 +516,10 @@ if(NOT HDF5_FOUND AND NOT HDF5_ROOT)
endif() endif()
foreach(L IN LISTS HDF5_${__lang}_LIBRARY_NAMES) foreach(L IN LISTS HDF5_${__lang}_LIBRARY_NAMES)
find_library(HDF5_${__lang}_LIBRARY_${L} ${L} ${HDF5_${__lang}_LIBRARY_DIRS}) find_library(HDF5_${__lang}_LIBRARY_${L}
NAMES ${L}
HINTS ${HDF5_${__lang}_LIBRARY_DIRS}
)
if(HDF5_${__lang}_LIBRARY_${L}) if(HDF5_${__lang}_LIBRARY_${L})
list(APPEND HDF5_${__lang}_LIBRARIES ${HDF5_${__lang}_LIBRARY_${L}}) list(APPEND HDF5_${__lang}_LIBRARIES ${HDF5_${__lang}_LIBRARY_${L}})
else() else()
...@@ -526,7 +529,10 @@ if(NOT HDF5_FOUND AND NOT HDF5_ROOT) ...@@ -526,7 +529,10 @@ if(NOT HDF5_FOUND AND NOT HDF5_ROOT)
if(FIND_HL) if(FIND_HL)
set(HDF5_${__lang}_HL_LIBRARIES) set(HDF5_${__lang}_HL_LIBRARIES)
foreach(L IN LISTS HDF5_${__lang}_HL_LIBRARY_NAMES) foreach(L IN LISTS HDF5_${__lang}_HL_LIBRARY_NAMES)
find_library(HDF5_${__lang}_LIBRARY_${L} ${L} ${HDF5_${__lang}_LIBRARY_DIRS}) find_library(HDF5_${__lang}_LIBRARY_${L}
NAMES ${L}
HINTS ${HDF5_${__lang}_LIBRARY_DIRS}
)
if(HDF5_${__lang}_LIBRARY_${L}) if(HDF5_${__lang}_LIBRARY_${L})
list(APPEND HDF5_${__lang}_HL_LIBRARIES ${HDF5_${__lang}_LIBRARY_${L}}) list(APPEND HDF5_${__lang}_HL_LIBRARIES ${HDF5_${__lang}_LIBRARY_${L}})
else() else()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment