From ec64fca705a5e677d7cdc309a75173fc1a946e0a Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Tue, 24 Jan 2023 21:01:03 -0600 Subject: [PATCH] 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. --- cmake/modules/FindDEAL_II_HDF5.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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() -- 2.39.5