From 86c697f49ace37b8161d775982c45ab1c787d745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20Strandenes?= Date: Wed, 17 Nov 2021 11:39:28 +0100 Subject: FindHDF5: Fix Fortran compiler interrogation without HL library When the HDF5 HL library is not available, FindHDF5 with Fortran does not work. The problem is because `cmake_hdf5_test.f90` tries to "use h5lt" and "use h5ds", which comes from the HL library. Then the basic compiler check fails completely. The two "use" lines were added by commit 00405af0f1 (HDF5: Refactor the use of compiler wrappers, 2016-04-04, v3.6.0-rc1~85^2) along with the rest of the check. Remove them. Fixes: #22890 --- Modules/FindHDF5.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index ce62d06..6e07da5 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -319,8 +319,6 @@ function(_HDF5_test_regular_compiler_Fortran success is_parallel) file(WRITE ${test_file} "program hdf5_hello\n" " use hdf5\n" - " use h5lt\n" - " use h5ds\n" " integer error\n" " call h5open_f(error)\n" " call h5close_f(error)\n" -- cgit v0.12