Skip to content

Commit

Permalink
fix findhdf5 on older cmake
Browse files Browse the repository at this point in the history
The change simply conditionally uses the argument depending on
whether cmake version supports it.
  • Loading branch information
David E. DeMarle committed Mar 17, 2017
1 parent 2fd1d44 commit b86ceca
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CMake/NewCMake/FindHDF5.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,13 @@ if(NOT HDF5_FOUND AND NOT HDF5_ROOT)
set(HDF5_COMPILER_NO_INTERROGATE False)
# If this language isn't using the wrapper, then try to seed the
# search options with the wrapper
if (${CMAKE_VERSION} VERSION_LESS "3.4")
set(names_per_dir_opt "")
else()
set(names_per_dir_opt "NAMES_PER_DIR")
endif()
find_program(HDF5_${__lang}_COMPILER_EXECUTABLE
NAMES ${HDF5_${__lang}_COMPILER_NAMES} NAMES_PER_DIR
NAMES ${HDF5_${__lang}_COMPILER_NAMES} ${names_per_dir_opt}
PATH_SUFFIXES bin Bin
DOC "HDF5 ${__lang} Wrapper compiler. Used only to detect HDF5 compile flags."
)
Expand Down

0 comments on commit b86ceca

Please sign in to comment.