From: Matthias Maier Date: Wed, 25 Jan 2023 03:01:03 +0000 (-0600) Subject: CMake: Silence a warning about HDF5_ROOT containing NOTFOUND X-Git-Tag: v9.5.0-rc1~614^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F14724%2Fhead;p=dealii.git CMake: Silence a warning about HDF5_ROOT containing NOTFOUND The FindHDF5.cmake package might set HDF5_DIR to "HDF5_DIR-NOTFOUND" (even though it finds and configures an HDF5 installation without a problem). This isn't terribly elegant, but us setting HDF5_ROOT to that variable triggers a bogus warning. Thus filter the invalid name. --- diff --git a/cmake/modules/FindDEAL_II_HDF5.cmake b/cmake/modules/FindDEAL_II_HDF5.cmake index 628c198456..d6ff4cf6dd 100644 --- a/cmake/modules/FindDEAL_II_HDF5.cmake +++ b/cmake/modules/FindDEAL_II_HDF5.cmake @@ -26,7 +26,8 @@ set(HDF5_DIR "" CACHE PATH "An optional hint to an hdf5 directory") set_if_empty(HDF5_DIR "$ENV{HDF5_DIR}") -if(NOT "${HDF5_DIR}" STREQUAL "") +if( NOT "${HDF5_DIR}" STREQUAL "" AND + NOT "${HDF5_DIR}" STREQUAL "HDF5_DIR-NOTFOUND" ) set(HDF5_ROOT "${HDF5_DIR}") endif()