diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2024-02-23 13:57:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-23 13:57:30 (GMT) |
commit | e7f41a2fbf9cc123b14edbb73501c19976c514c4 (patch) | |
tree | 95e286eb43a0936cb8688b502987b9f46fcabd9e /config/cmake/HDF5UseFortran.cmake | |
parent | f02ecb21dd96a2445d988e8684a015fac9c30afd (diff) | |
download | hdf5-e7f41a2fbf9cc123b14edbb73501c19976c514c4.zip hdf5-e7f41a2fbf9cc123b14edbb73501c19976c514c4.tar.gz hdf5-e7f41a2fbf9cc123b14edbb73501c19976c514c4.tar.bz2 |
Fix the datatype passed to H5*exists_async APIs in tests. (#4033)
Add a new testing function to verify C_BOOL values.
Diffstat (limited to 'config/cmake/HDF5UseFortran.cmake')
-rw-r--r-- | config/cmake/HDF5UseFortran.cmake | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake index 7f125f1..d34876c 100644 --- a/config/cmake/HDF5UseFortran.cmake +++ b/config/cmake/HDF5UseFortran.cmake @@ -101,6 +101,16 @@ else () set (${HDF_PREFIX}_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE 0) endif () +# Check to see C_BOOL is different from default LOGICAL + +READ_SOURCE("MODULE l_type_mod" "END PROGRAM PROG_FC_C_BOOL_EQ_LOGICAL" SOURCE_CODE) +check_fortran_source_compiles (${SOURCE_CODE} FORTRAN_C_BOOL_IS_UNIQUE SRC_EXT f90) +if (${FORTRAN_C_BOOL_IS_UNIQUE}) + set (${HDF_PREFIX}_FORTRAN_C_BOOL_IS_UNIQUE 1) +else () + set (${HDF_PREFIX}_FORTRAN_C_BOOL_IS_UNIQUE 0) +endif () + ## Set the sizeof function for use later in the fortran tests if (${HDF_PREFIX}_FORTRAN_HAVE_STORAGE_SIZE) set (FC_SIZEOF_A "STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)") |