diff options
Diffstat (limited to 'fortran')
-rw-r--r-- | fortran/examples/CMakeLists.txt | 12 | ||||
-rw-r--r-- | fortran/examples/CMakeTests.cmake | 13 | ||||
-rw-r--r-- | fortran/examples/testh5fc.sh.in | 4 | ||||
-rw-r--r-- | fortran/src/CMakeLists.txt | 85 | ||||
-rw-r--r-- | fortran/src/H5config_f.inc.cmake | 8 | ||||
-rw-r--r-- | fortran/src/H5config_f.inc.in | 3 | ||||
-rw-r--r-- | fortran/src/hdf5_fortrandll.def.in | 2 | ||||
-rw-r--r-- | fortran/test/CMakeLists.txt | 4 | ||||
-rw-r--r-- | fortran/test/CMakeTests.cmake | 23 | ||||
-rw-r--r-- | fortran/testpar/CMakeLists.txt | 2 |
10 files changed, 91 insertions, 65 deletions
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index 793df8d..3aaad08 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -45,7 +45,7 @@ foreach (example ${examples}) target_include_directories (f90_ex_${example} PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/static" - "${HDF5_SRC_DIR}" + "${HDF5_SRC_INCLUDE_DIRS}" "${HDF5_SRC_BINARY_DIR}" "${HDF5_F90_BINARY_DIR}" "${HDF5_F90_BINARY_DIR}/static" @@ -60,7 +60,7 @@ foreach (example ${examples}) target_include_directories (f90_ex_${example} PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/shared" - "${HDF5_SRC_DIR}" + "${HDF5_SRC_INCLUDE_DIRS}" "${HDF5_SRC_BINARY_DIR}" "${HDF5_F90_BINARY_DIR}" "${HDF5_F90_BINARY_DIR}/shared" @@ -86,7 +86,7 @@ foreach (example ${F2003_examples}) target_include_directories (f03_ex_${example} PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/static" - "${HDF5_SRC_DIR}" + "${HDF5_SRC_INCLUDE_DIRS}" "${HDF5_SRC_BINARY_DIR}" "${HDF5_F90_BINARY_DIR}" "${HDF5_F90_BINARY_DIR}/static" @@ -101,7 +101,7 @@ foreach (example ${F2003_examples}) target_include_directories (f03_ex_${example} PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/shared" - "${HDF5_SRC_DIR}" + "${HDF5_SRC_INCLUDE_DIRS}" "${HDF5_SRC_BINARY_DIR}" "${HDF5_F90_BINARY_DIR}" "${HDF5_F90_BINARY_DIR}/shared" @@ -127,7 +127,7 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) target_include_directories (f90_ex_ph5example PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/static" - "${HDF5_SRC_DIR}" + "${HDF5_SRC_INCLUDE_DIRS}" "${HDF5_SRC_BINARY_DIR}" "${HDF5_F90_BINARY_DIR}" "${HDF5_F90_BINARY_DIR}/static" @@ -148,7 +148,7 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) target_include_directories (f90_ex_ph5example PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/shared" - "${HDF5_SRC_DIR}" + "${HDF5_SRC_INCLUDE_DIRS}" "${HDF5_SRC_BINARY_DIR}" "${HDF5_F90_BINARY_DIR}" "${HDF5_F90_BINARY_DIR}/shared" diff --git a/fortran/examples/CMakeTests.cmake b/fortran/examples/CMakeTests.cmake index 09b3fa0..dabab8b 100644 --- a/fortran/examples/CMakeTests.cmake +++ b/fortran/examples/CMakeTests.cmake @@ -40,7 +40,18 @@ if (HDF5_TEST_SERIAL) NAME f90_ex-clear-objects COMMAND ${CMAKE_COMMAND} -E remove ${test_ex_fortran_CLEANFILES} ) - set_tests_properties (f90_ex-clear-objects PROPERTIES FIXTURES_SETUP clear_f90_ex) + set_tests_properties (f90_ex-clear-objects PROPERTIES + FIXTURES_SETUP clear_f90_ex + WORKING_DIRECTORY ${PROJECT_BINARY_DIR} + ) + add_test ( + NAME f90_ex-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove ${test_ex_fortran_CLEANFILES} + ) + set_tests_properties (f90_ex-clean-objects PROPERTIES + FIXTURES_CLEANUP clear_f90_ex + WORKING_DIRECTORY ${PROJECT_BINARY_DIR} + ) foreach (example ${examples}) if (HDF5_ENABLE_USING_MEMCHECKER) diff --git a/fortran/examples/testh5fc.sh.in b/fortran/examples/testh5fc.sh.in index 2f7c176..0328bbb 100644 --- a/fortran/examples/testh5fc.sh.in +++ b/fortran/examples/testh5fc.sh.in @@ -11,10 +11,6 @@ # help@hdfgroup.org. # # Tests for the h5fc compiler tool -# Created: Albert Cheng, 2007/3/14 -# -# Modification: -# srcdir=@srcdir@ diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index c253c2c..3dac037 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -10,6 +10,12 @@ if (WIN32) set (H5_NOPAREXP ";") endif () set (H5_F03EXP ";") + if (NOT H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE) + set (H5_DBL_NOT_UNIQUE_EXP ";") + endif () + if (NOT H5_NO_DEPRECATED_SYMBOLS) + set (H5_NO_DEPRECATED_SYMBOLS ";") + endif () configure_file (${HDF5_F90_SRC_SOURCE_DIR}/hdf5_fortrandll.def.in ${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def @ONLY) endif () endif () @@ -71,7 +77,7 @@ add_executable (H5match_types ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h ${HDF5_F90_SRC_SOURCE_DIR}/H5match_types.c ) -target_include_directories (H5match_types PRIVATE "${HDF5_SRC_BINARY_DIR};${HDF5_SRC_DIR};${HDF5_F90_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") +target_include_directories (H5match_types PRIVATE "${HDF5_SRC_BINARY_DIR};${HDF5_SRC_INCLUDE_DIRS};${HDF5_F90_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") add_custom_command (TARGET H5match_types POST_BUILD BYPRODUCTS ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 @@ -159,7 +165,7 @@ endif () if (BUILD_STATIC_LIBS) add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS} ${f90CStub_CGEN_HDRS}) target_include_directories (${HDF5_F90_C_LIB_TARGET} - PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>" + PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>" INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>" ) target_compile_options(${HDF5_F90_C_LIB_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}") @@ -178,7 +184,7 @@ endif () if (BUILD_SHARED_LIBS) add_library (${HDF5_F90_C_LIBSH_TARGET} SHARED ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS} ${f90CStub_CGEN_SHHDRS}) target_include_directories (${HDF5_F90_C_LIBSH_TARGET} - PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>" + PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>" INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>" ) target_compile_options(${HDF5_F90_C_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}") @@ -420,29 +426,33 @@ else () ) endif () +set (mod_export_files + h5fortran_types.mod + hdf5.mod + h5fortkit.mod + h5global.mod + h5a.mod + h5d.mod + h5e.mod + h5f.mod + h5g.mod + h5i.mod + h5l.mod + h5lib.mod + h5o.mod + h5p.mod + h5r.mod + h5s.mod + h5t.mod + h5vl.mod + h5z.mod + h5_gen.mod +) + if (BUILD_STATIC_LIBS) - set (mod_files - ${MOD_BUILD_DIR}/h5fortran_types.mod - ${MOD_BUILD_DIR}/hdf5.mod - ${MOD_BUILD_DIR}/h5fortkit.mod - ${MOD_BUILD_DIR}/h5global.mod - ${MOD_BUILD_DIR}/h5a.mod - ${MOD_BUILD_DIR}/h5d.mod - ${MOD_BUILD_DIR}/h5e.mod - ${MOD_BUILD_DIR}/h5f.mod - ${MOD_BUILD_DIR}/h5g.mod - ${MOD_BUILD_DIR}/h5i.mod - ${MOD_BUILD_DIR}/h5l.mod - ${MOD_BUILD_DIR}/h5lib.mod - ${MOD_BUILD_DIR}/h5o.mod - ${MOD_BUILD_DIR}/h5p.mod - ${MOD_BUILD_DIR}/h5r.mod - ${MOD_BUILD_DIR}/h5s.mod - ${MOD_BUILD_DIR}/h5t.mod - ${MOD_BUILD_DIR}/h5vl.mod - ${MOD_BUILD_DIR}/h5z.mod - ${MOD_BUILD_DIR}/h5_gen.mod - ) + foreach (mod_file ${mod_export_files}) + set (mod_files ${mod_files} ${MOD_BUILD_DIR}/${mod_file}) + endforeach () install ( FILES ${mod_files} @@ -464,28 +474,9 @@ if (BUILD_STATIC_LIBS) endif () if (BUILD_SHARED_LIBS) - set (modsh_files - ${MODSH_BUILD_DIR}/h5fortran_types.mod - ${MODSH_BUILD_DIR}/hdf5.mod - ${MODSH_BUILD_DIR}/h5fortkit.mod - ${MODSH_BUILD_DIR}/h5global.mod - ${MODSH_BUILD_DIR}/h5a.mod - ${MODSH_BUILD_DIR}/h5d.mod - ${MODSH_BUILD_DIR}/h5e.mod - ${MODSH_BUILD_DIR}/h5f.mod - ${MODSH_BUILD_DIR}/h5g.mod - ${MODSH_BUILD_DIR}/h5i.mod - ${MODSH_BUILD_DIR}/h5l.mod - ${MODSH_BUILD_DIR}/h5lib.mod - ${MODSH_BUILD_DIR}/h5o.mod - ${MODSH_BUILD_DIR}/h5p.mod - ${MODSH_BUILD_DIR}/h5r.mod - ${MODSH_BUILD_DIR}/h5s.mod - ${MODSH_BUILD_DIR}/h5t.mod - ${MODSH_BUILD_DIR}/h5vl.mod - ${MODSH_BUILD_DIR}/h5z.mod - ${MODSH_BUILD_DIR}/h5_gen.mod - ) + foreach (mod_file ${mod_export_files}) + set (modsh_files ${modsh_files} ${MODSH_BUILD_DIR}/${mod_file}) + endforeach () install ( FILES ${modsh_files} diff --git a/fortran/src/H5config_f.inc.cmake b/fortran/src/H5config_f.inc.cmake index 565d6eb..3c9bf88 100644 --- a/fortran/src/H5config_f.inc.cmake +++ b/fortran/src/H5config_f.inc.cmake @@ -11,7 +11,7 @@ ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! fortran/src/H5config_f.inc. Generated from fortran/src/H5config_f.inc.in by configure -! Define if we have parallel support +! Define if there is parallel support #cmakedefine01 H5_HAVE_PARALLEL #if H5_HAVE_PARALLEL == 0 #undef H5_HAVE_PARALLEL @@ -70,3 +70,9 @@ ! Fortran compiler id #define H5_Fortran_COMPILER_ID @CMAKE_Fortran_COMPILER_ID@ + +! Define if deprecated public API symbols are disabled +#cmakedefine01 H5_NO_DEPRECATED_SYMBOLS +#if H5_NO_DEPRECATED_SYMBOLS == 0 +#undef H5_NO_DEPRECATED_SYMBOLS +#endif
\ No newline at end of file diff --git a/fortran/src/H5config_f.inc.in b/fortran/src/H5config_f.inc.in index 685b4d2..bd32a8c 100644 --- a/fortran/src/H5config_f.inc.in +++ b/fortran/src/H5config_f.inc.in @@ -71,3 +71,6 @@ ! Fortran compiler name #undef Fortran_COMPILER_ID +! Define if deprecated public API symbols are disabled +#undef NO_DEPRECATED_SYMBOLS + diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in index 4207239..b5d1af3 100644 --- a/fortran/src/hdf5_fortrandll.def.in +++ b/fortran/src/hdf5_fortrandll.def.in @@ -14,7 +14,7 @@ H5A_mp_H5AWRITE_CHAR_SCALAR H5A_mp_H5AREAD_CHAR_SCALAR H5A_mp_H5ACREATE_F H5A_mp_H5AOPEN_NAME_F -H5A_mp_H5AOPEN_IDX_F +@H5_NO_DEPRECATED_SYMBOLS@H5A_mp_H5AOPEN_IDX_F H5A_mp_H5AGET_SPACE_F H5A_mp_H5AGET_TYPE_F H5A_mp_H5AGET_NAME_F diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index 2d29497..bfad283 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -45,7 +45,7 @@ if (NOT BUILD_SHARED_LIBS) add_library (${HDF5_F90_C_TEST_LIB_TARGET} STATIC t.c t.h) set_source_files_properties (t.c PROPERTIES LANGUAGE C) target_include_directories (${HDF5_F90_C_TEST_LIB_TARGET} - PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>" + PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>" INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>" ) target_compile_options(${HDF5_F90_C_TEST_LIB_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}") @@ -62,7 +62,7 @@ if (NOT BUILD_SHARED_LIBS) else () add_library (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED t.c t.h) target_include_directories (${HDF5_F90_C_TEST_LIBSH_TARGET} - PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>" + PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>" INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>" ) target_compile_options(${HDF5_F90_C_TEST_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}") diff --git a/fortran/test/CMakeTests.cmake b/fortran/test/CMakeTests.cmake index 68d8a5a..93571e1 100644 --- a/fortran/test/CMakeTests.cmake +++ b/fortran/test/CMakeTests.cmake @@ -57,7 +57,18 @@ add_test ( NAME FORTRAN_testhdf5-clear-objects COMMAND ${CMAKE_COMMAND} -E remove ${testhdf5_fortran_CLEANFILES} ) -set_tests_properties (FORTRAN_testhdf5-clear-objects PROPERTIES FIXTURES_SETUP clear_testhdf5_fortran) +set_tests_properties (FORTRAN_testhdf5-clear-objects PROPERTIES + FIXTURES_SETUP clear_testhdf5_fortran + WORKING_DIRECTORY ${PROJECT_BINARY_DIR} +) +add_test ( + NAME FORTRAN_testhdf5-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove ${testhdf5_fortran_CLEANFILES} +) +set_tests_properties (FORTRAN_testhdf5-clean-objects PROPERTIES + FIXTURES_CLEANUP clear_testhdf5_fortran + WORKING_DIRECTORY ${PROJECT_BINARY_DIR} +) if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME FORTRAN_testhdf5_fortran COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:testhdf5_fortran>) @@ -147,6 +158,9 @@ else () -P "${HDF_RESOURCES_DIR}/runTest.cmake" ) endif () +set_tests_properties (FORTRAN_vol_connector PROPERTIES + FIXTURES_REQUIRED clear_testhdf5_fortran +) #-- Adding test for fflush1 add_test ( @@ -169,3 +183,10 @@ add_test ( set_tests_properties (FORTRAN_fflush2 PROPERTIES DEPENDS FORTRAN_fflush1 ) +add_test ( + NAME FORTRAN_flush1-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove flush.h5 +) +set_tests_properties (FORTRAN_flush1-clean-objects PROPERTIES + DEPENDS FORTRAN_fflush2 +) diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt index d41343c..f2e9201 100644 --- a/fortran/testpar/CMakeLists.txt +++ b/fortran/testpar/CMakeLists.txt @@ -53,8 +53,6 @@ else () ) endif () -#set_property(TARGET parallel_test APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">) -#set_property(TARGET parallel_test APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>) if(MSVC) set_property(TARGET parallel_test PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() |