]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Silence a warning about HDF5_ROOT containing NOTFOUND 14724/head
authorMatthias Maier <tamiko@43-1.org>
Wed, 25 Jan 2023 03:01:03 +0000 (21:01 -0600)
committerMatthias Maier <tamiko@43-1.org>
Wed, 25 Jan 2023 03:01:03 +0000 (21:01 -0600)
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

index 628c1984569a32a864f50a8d31fec9667e85aa61..d6ff4cf6ddfef05b47ac5cac5770f37ef0cba40b 100644 (file)
@@ -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()
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.