diff options
Diffstat (limited to 'config/cmake/HDF5UseFortran.cmake')
-rw-r--r-- | config/cmake/HDF5UseFortran.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake index d34876c..73b4f74 100644 --- a/config/cmake/HDF5UseFortran.cmake +++ b/config/cmake/HDF5UseFortran.cmake @@ -124,6 +124,15 @@ else () message (FATAL_ERROR "Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE") endif () +# Check to see of Fortran supports allocatable character +READ_SOURCE("PROGRAM PROG_CHAR_ALLOC" "END PROGRAM PROG_CHAR_ALLOC" SOURCE_CODE) +check_fortran_source_compiles (${SOURCE_CODE} FORTRAN_CHAR_ALLOC SRC_EXT f90) +if (${FORTRAN_CHAR_ALLOC}) + set (${HDF_PREFIX}_FORTRAN_HAVE_CHAR_ALLOC 1) +else () + set (${HDF_PREFIX}_FORTRAN_HAVE_CHAR_ALLOC 0) +endif () + #----------------------------------------------------------------------------- # Determine the available KINDs for REALs and INTEGERs #----------------------------------------------------------------------------- |