Remove F2003 Option and references

This commit is contained in:
Allen Byrne 2019-02-06 10:10:46 -06:00
parent 3ebfd7edd4
commit e73197077b
8 changed files with 68 additions and 107 deletions

View File

@ -835,9 +835,6 @@ set (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) name ## _")
if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/fortran")
option (HDF5_BUILD_FORTRAN "Build FORTRAN support" OFF)
if (HDF5_BUILD_FORTRAN)
option (HDF5_ENABLE_F2003 "Enable FORTRAN 2003 Standard" ON)
include (${HDF_RESOURCES_EXT_DIR}/HDFUseFortran.cmake)
message (STATUS "Fortran compiler ID is ${CMAKE_Fortran_COMPILER_ID}")
@ -850,10 +847,8 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for
include (${HDF_RESOURCES_DIR}/HDF5UseFortran.cmake)
set (LINK_Fortran_LIBS ${LINK_LIBS})
if (HDF5_ENABLE_F2003)
if (NOT FORTRAN_HAVE_ISO_C_BINDING)
set (HDF5_ENABLE_F2003 OFF)
endif ()
if (NOT FORTRAN_HAVE_ISO_C_BINDING)
message (FATAL_ERROR " **** Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, disable HDF5_BUILD_FORTRAN **** ")
endif ()
# Parallel IO usage requires MPI to be Linked and Included

View File

@ -33,12 +33,8 @@
#############################################################################################
#### fortran enabled ####
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=ON")
### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=ON")
#### fortran disabled ####
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=OFF")
#############################################################################################
#### java enabled ####

View File

@ -33,12 +33,8 @@ set (MAX_PROC_COUNT 8)
#############################################################################################
#### fortran enabled ####
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=ON")
### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=ON")
#### fortran disabled ####
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=OFF")
#############################################################################################
#### java enabled ####

View File

@ -33,12 +33,8 @@
#############################################################################################
#### fortran enabled ####
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=ON")
### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=ON")
#### fortran disabled ####
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=OFF")
#############################################################################################
#### java enabled ####

View File

@ -109,48 +109,46 @@ foreach (example ${examples})
endif ()
endforeach ()
if (HDF5_ENABLE_F2003)
foreach (example ${F2003_examples})
foreach (example ${F2003_examples})
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME f03_ex_${example} COMMAND $<TARGET_FILE:f03_ex_${example}>)
else ()
add_test (NAME f03_ex_${example} COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:f03_ex_${example}>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
-D "TEST_OUTPUT=f03_ex_${example}.txt"
#-D "TEST_REFERENCE=f03_ex_${example}.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (f03_ex_${example} PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "f03_ex_${example}")
if (BUILD_SHARED_LIBS)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME f03_ex_${example} COMMAND $<TARGET_FILE:f03_ex_${example}>)
add_test (NAME f03_ex-shared_${example} COMMAND $<TARGET_FILE:f03_ex_${example}-shared>)
else ()
add_test (NAME f03_ex_${example} COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:f03_ex_${example}>"
add_test (NAME f03_ex-shared_${example} COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:f03_ex_${example}-shared>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
-D "TEST_OUTPUT=f03_ex_${example}.txt"
#-D "TEST_REFERENCE=f03_ex_${example}.out"
-D "TEST_OUTPUT=f03_ex_${example}-shared.txt"
#-D "TEST_REFERENCE=f03_ex_${example}-shared.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (f03_ex_${example} PROPERTIES DEPENDS ${last_test})
set_tests_properties (f03_ex-shared_${example} PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "f03_ex_${example}")
if (BUILD_SHARED_LIBS)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME f03_ex-shared_${example} COMMAND $<TARGET_FILE:f03_ex_${example}-shared>)
else ()
add_test (NAME f03_ex-shared_${example} COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:f03_ex_${example}-shared>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
-D "TEST_OUTPUT=f03_ex_${example}-shared.txt"
#-D "TEST_REFERENCE=f03_ex_${example}-shared.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (f03_ex-shared_${example} PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "f03_ex-shared_${example}")
endif ()
endforeach ()
endif ()
set (last_test "f03_ex-shared_${example}")
endif ()
endforeach ()
if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
add_test (NAME f90_ex_ph5example COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:f90_ex_ph5example> ${MPIEXEC_POSTFLAGS})

View File

@ -61,8 +61,6 @@ RunTest()
./$TEST_EXEC
}
F2003_ENABLED=@HAVE_FORTRAN_2003@
################## MAIN ##################
# Run tests
@ -97,17 +95,8 @@ then
RunTest mountexample &&\
rm mountexample &&\
RunTest compound &&\
rm compound); then
EXIT_VALUE=${EXIT_SUCCESS}
else
EXIT_VALUE=${EXIT_FAILURE}
fi
fi
if [ $EXIT_VALUE -eq ${EXIT_SUCCESS} -a "$F2003_ENABLED" = "yes" ]
then
# Add attention tests for Fortran 2003 features
if (RunTest rwdset_fortran2003 &&\
rm compound &&\
RunTest rwdset_fortran2003 &&\
rm rwdset_fortran2003 &&\
RunTest nested_derived_type &&\
rm nested_derived_type &&\
@ -120,12 +109,11 @@ then
EXIT_VALUE=${EXIT_FAILURE}
fi
fi
# Cleanup
rm *.o
rm *.h5
echo
exit $EXIT_VALUE
exit $EXIT_VALUE

View File

@ -9,11 +9,7 @@ if (WIN32)
if (NOT H5_HAVE_PARALLEL)
set (H5_NOPAREXP ";")
endif ()
if (NOT HDF5_ENABLE_F2003)
set (H5_NOF03EXP ";")
else ()
set (H5_F03EXP ";")
endif ()
set (H5_F03EXP ";")
configure_file (${HDF5_F90_SRC_SOURCE_DIR}/hdf5_fortrandll.def.in ${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def @ONLY)
endif ()
endif ()

View File

@ -103,26 +103,24 @@ endif ()
set_tests_properties (FORTRAN_testhdf5_fortran_1_8 PROPERTIES DEPENDS FORTRAN_testhdf5_fortran)
#-- Adding test for fortranlib_test_F03
if (HDF5_ENABLE_F2003)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME FORTRAN_fortranlib_test_F03 COMMAND $<TARGET_FILE:fortranlib_test_F03>)
else ()
add_test (NAME FORTRAN_fortranlib_test_F03 COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:fortranlib_test_F03>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
-D "TEST_REGEX= 0 error.s."
-D "TEST_MATCH= 0 error(s)"
-D "TEST_OUTPUT=fortranlib_test_F03.txt"
#-D "TEST_REFERENCE=fortranlib_test_F03.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME FORTRAN_fortranlib_test_F03 COMMAND $<TARGET_FILE:fortranlib_test_F03>)
else ()
add_test (NAME FORTRAN_fortranlib_test_F03 COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:fortranlib_test_F03>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
-D "TEST_REGEX= 0 error.s."
-D "TEST_MATCH= 0 error(s)"
-D "TEST_OUTPUT=fortranlib_test_F03.txt"
#-D "TEST_REFERENCE=fortranlib_test_F03.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
# set_tests_properties (FORTRAN_fortranlib_test_F03 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
set_tests_properties (FORTRAN_fortranlib_test_F03 PROPERTIES DEPENDS FORTRAN_testhdf5_fortran_1_8)
endif ()
#-- Adding test for fflush1
add_test (NAME FORTRAN_fflush1 COMMAND $<TARGET_FILE:fflush1>)
@ -215,26 +213,24 @@ if (BUILD_SHARED_LIBS)
set_tests_properties (FORTRAN_testhdf5_fortran_1_8-shared PROPERTIES DEPENDS FORTRAN_testhdf5_fortran_1_8)
#-- Adding test for fortranlib_test_F03
if (HDF5_ENABLE_F2003)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME FORTRAN_fortranlib_test_F03-shared COMMAND $<TARGET_FILE:fortranlib_test_F03-shared>)
else ()
add_test (NAME FORTRAN_fortranlib_test_F03-shared COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:fortranlib_test_F03-shared>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
-D "TEST_REGEX= 0 error.s."
-D "TEST_MATCH= 0 error(s)"
-D "TEST_OUTPUT=fortranlib_test_F03.txt"
#-D "TEST_REFERENCE=fortranlib_test_F03.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/fshared"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
# set_tests_properties (FORTRAN_fortranlib_test_F03-shared PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
set_tests_properties (FORTRAN_fortranlib_test_F03-shared PROPERTIES DEPENDS FORTRAN_fortranlib_test_F03)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME FORTRAN_fortranlib_test_F03-shared COMMAND $<TARGET_FILE:fortranlib_test_F03-shared>)
else ()
add_test (NAME FORTRAN_fortranlib_test_F03-shared COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:fortranlib_test_F03-shared>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
-D "TEST_REGEX= 0 error.s."
-D "TEST_MATCH= 0 error(s)"
-D "TEST_OUTPUT=fortranlib_test_F03.txt"
#-D "TEST_REFERENCE=fortranlib_test_F03.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/fshared"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
# set_tests_properties (FORTRAN_fortranlib_test_F03-shared PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
set_tests_properties (FORTRAN_fortranlib_test_F03-shared PROPERTIES DEPENDS FORTRAN_fortranlib_test_F03)
#-- Adding test for fflush1
add_test (NAME FORTRAN_fflush1-shared COMMAND $<TARGET_FILE:fflush1-shared>)