From 28bb68e3472a9f8c6d8eec894e85de74b976ff02 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 17 Feb 2017 09:07:18 -0500 Subject: FindHDF5: Restore HDF5__INCLUDE_DIR advanced cache entry mark Refactoring in commit v3.6.0-rc1~72^2 (HDF5: Rework component searching to correctly find HL for all bindings, 2016-05-12) renamed the language loop variable used to construct the name of `HDF5__INCLUDE_DIR` but forgot to update it in the `mark_as_advanced` call. Fix it now. Issue: #16651 --- Modules/FindHDF5.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index e1199a7..fb97d68 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -680,7 +680,7 @@ if( NOT HDF5_FOUND ) PATH_SUFFIXES include Include ${_HDF5_SEARCH_OPTS} ) - mark_as_advanced(HDF5_${LANGUAGE}_INCLUDE_DIR) + mark_as_advanced(HDF5_${__lang}_INCLUDE_DIR) list(APPEND HDF5_INCLUDE_DIRS ${HDF5_${__lang}_INCLUDE_DIR}) # find the HDF5 libraries -- cgit v0.12 From 96d6139386e22f672f14071eae3911fd7200f079 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 17 Feb 2017 09:21:02 -0500 Subject: FindHDF5: Fix search for language-specific header file Refactoring in commit v3.6.0-rc1~85^2 (HDF5: Refactor the use of compiler wrappers, 2016-04-04) converted code of the form if(${LANGUAGE} MATCHES ...) to if(LANGUAGE MATCHES ...) However, `LANGUAGE` is a foreach() loop variable and not a normal variable so auto-dereference does not occur. Restore the explicit `${}` syntax and use the new name of the loop variable that has changed since then too. Fixes: #16651 --- Modules/FindHDF5.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index fb97d68..65a825d 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -666,9 +666,9 @@ if( NOT HDF5_FOUND ) foreach(__lang IN LISTS HDF5_LANGUAGE_BINDINGS) # find the HDF5 include directories - if(LANGUAGE STREQUAL "Fortran") + if("${__lang}" STREQUAL "Fortran") set(HDF5_INCLUDE_FILENAME hdf5.mod) - elseif(LANGUAGE STREQUAL "CXX") + elseif("${__lang}" STREQUAL "CXX") set(HDF5_INCLUDE_FILENAME H5Cpp.h) else() set(HDF5_INCLUDE_FILENAME hdf5.h) -- cgit v0.12