diff --git a/CMakeLists.txt b/CMakeLists.txt index d6821c4143..73863bc3b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,6 +40,11 @@ endif() # HDF5 for binary output #=============================================================================== +# Allow user to specify HDF5_ROOT +if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.12) + cmake_policy(SET CMP0074 NEW) +endif() + # Unfortunately FindHDF5.cmake will always prefer a serial HDF5 installation # over a parallel installation if both appear on the user's PATH. To get around # this, we check for the environment variable HDF5_ROOT and if it exists, use it