diff --git a/CMakeLists.txt b/CMakeLists.txt index f4ca745ed..ac05e56b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,7 +77,7 @@ endif() # Version 1.12 of HDF5 deprecates the H5Oget_info_by_idx() interface. # Thus, we give these flags to allow usage of the old interface in newer # versions of HDF5. -if(${HDF5_VERSION} VERSION_GREATER_EQUAL "1.12.0") +if(NOT (${HDF5_VERSION} VERSION_LESS 1.12.0)) list(APPEND cxxflags -DH5Oget_info_by_idx_vers=1 -DH5O_info_t_vers=1) endif()