Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simply version check logic #2015

Merged
merged 1 commit into from
Jun 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -802,19 +802,11 @@ IF(USE_HDF5)

# Check to see if HDF5 library is 1.10.6 or greater.
# Used to control path name conversion
# Check HDF5 version
SET(HDF5_UTF8_PATHS OFF)
CHECK_C_SOURCE_COMPILES("
#include <H5public.h>
int main() {
#if (H5_VERS_MAJOR*10000 + H5_VERS_MINOR*100 + H5_VERS_RELEASE < 11006)
choke me;
#endif
}" HDF5_VERSION_1106)

IF(HDF5_VERSION_1106)
SET(HDF5_UTF8_PATHS ON)
ENDIF(HDF5_VERSION_1106)
IF(${HDF5_VERSION} VERSION_GREATER "1.10.5")
SET(HDF5_UTF8_PATHS ON)
ELSE()
SET(HDF5_UTF8_PATHS OFF)
ENDIF()

MESSAGE("-- Checking for HDF5 version 1.10.6 or later: ${HDF5_UTF8_PATHS}")

Expand Down