Skip to content

Commit

Permalink
Fix quadmath try-compile in CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
derobins committed Jul 14, 2024
1 parent 0a5a03d commit f21cae5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion config/cmake/ConfigureChecks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ endif ()
# check for that. This is only used by the build system and doesn't need
# to be exported to H5pubconf.h.
CHECK_INCLUDE_FILES("quadmath.h" INCLUDE_QUADMATH_H)
# Convert TRUE/FALSE to 0/1 for preprocessor values in test code, below
if (${INCLUDE_QUADMATH_H})
set(C_INCLUDE_QUADMATH_H 1)
else ()
set(C_INCLUDE_QUADMATH_H 0)
endif ()

if (CYGWIN)
set (CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE")
Expand Down Expand Up @@ -733,7 +739,7 @@ if (HDF5_BUILD_FORTRAN)
#include <float.h>\n\
#include <stdio.h>\n\
#if ${C_HAVE_FLOAT128}\n\
# if ${INCLUDE_QUADMATH_H}!=0\n\
# if ${C_INCLUDE_QUADMATH_H}!=0\n\
# include <quadmath.h>\n\
# endif\n\
# ifdef FLT128_DIG\n\
Expand Down

0 comments on commit f21cae5

Please sign in to comment.