Commit 96d61393 authored by Brad King's avatar Brad King

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
parent 28bb68e3
......@@ -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)
......
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