summaryrefslogtreecommitdiffstats
path: root/fortran/test
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2015-02-20 17:25:56 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2015-02-20 17:25:56 (GMT)
commitf679b9006dc1a5f0a32626200b943fd8ce5f1a6e (patch)
tree46a7d39e1a03e3be72f55a90106ad1aa6c9d7dee /fortran/test
parent54a36600c0eceb18db3c1d7b4429f75b7c005f10 (diff)
downloadhdf5-f679b9006dc1a5f0a32626200b943fd8ce5f1a6e.zip
hdf5-f679b9006dc1a5f0a32626200b943fd8ce5f1a6e.tar.gz
hdf5-f679b9006dc1a5f0a32626200b943fd8ce5f1a6e.tar.bz2
[svn-r26253] Update CMake with fortran source properties and defines, correct name of hl fortran examples option check
Diffstat (limited to 'fortran/test')
-rw-r--r--fortran/test/CMakeLists.txt6
-rw-r--r--fortran/test/tf.f9024
-rw-r--r--fortran/test/tf_F03.f9010
-rw-r--r--fortran/test/tf_F08.f9010
4 files changed, 27 insertions, 23 deletions
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 3b235d4..3395906 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -10,6 +10,7 @@ INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${
# Add Test Lib
#-----------------------------------------------------------------------------
add_library (${HDF5_F90_C_TEST_LIB_TARGET} ${LIB_TYPE} t.c)
+set_source_files_properties (t.c PROPERTIES LANGUAGE C)
TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIB_TARGET} " " " ")
target_link_libraries (${HDF5_F90_C_TEST_LIB_TARGET}
${HDF5_F90_C_LIB_TARGET}
@@ -18,12 +19,14 @@ target_link_libraries (${HDF5_F90_C_TEST_LIB_TARGET}
H5_SET_LIB_OPTIONS (${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_C_TEST_LIB_NAME} ${LIB_TYPE})
set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES
FOLDER libraries/test/fortran
+ LINKER_LANGUAGE C
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
# See if the F2008 intrinsic STORAGE_SIZE and C_SIZEOF are supported. If not then
# fall back to F2003. If F2003 not supported then use F90 for the tests.
+set_source_files_properties (tf_F90.f90 tf_F03.f90 tf_F08.f90 tf.f90 PROPERTIES LANGUAGE Fortran)
if (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF)
add_library (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf_F08.f90 tf.f90)
elseif (HDF5_ENABLE_F2003)
@@ -36,7 +39,7 @@ endif (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF)
set (SHARED_LINK_FLAGS " ")
if (WIN32)
if (BUILD_SHARED_LIBS)
- set_property (TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS BUILD_HDF5_DLL)
+ set_property (TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS BUILD_HDF5_TEST_DLL)
if (MSVC)
set (SHARED_LINK_FLAGS "/DLL")
endif (MSVC)
@@ -53,6 +56,7 @@ target_link_libraries (${HDF5_F90_TEST_LIB_TARGET}
H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_TEST_LIB_NAME} ${LIB_TYPE})
set_target_properties (${HDF5_F90_TEST_LIB_TARGET} PROPERTIES
FOLDER libraries/test/fortran
+ LINKER_LANGUAGE Fortran
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
diff --git a/fortran/test/tf.f90 b/fortran/test/tf.f90
index 063e93d..6d5911f 100644
--- a/fortran/test/tf.f90
+++ b/fortran/test/tf.f90
@@ -36,7 +36,7 @@ MODULE TH5_MISC
CONTAINS
!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$if defined(BUILD_HDF5_TEST_DLL)
!DEC$attributes dllexport :: dreal_eq
!DEC$endif
LOGICAL FUNCTION dreal_eq(a,b)
@@ -49,7 +49,7 @@ CONTAINS
END FUNCTION dreal_eq
!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$if defined(BUILD_HDF5_TEST_DLL)
!DEC$attributes dllexport :: verify_real_kind_7
!DEC$endif
SUBROUTINE verify_real_kind_7(string,value,correct_value,total_error)
@@ -66,7 +66,7 @@ CONTAINS
END SUBROUTINE verify_real_kind_7
!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$if defined(BUILD_HDF5_TEST_DLL)
!DEC$attributes dllexport :: write_test_status
!DEC$endif
SUBROUTINE write_test_status( test_result, test_title, total_error)
@@ -105,7 +105,7 @@ CONTAINS
!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$if defined(BUILD_HDF5_TEST_DLL)
!DEC$attributes dllexport :: check
!DEC$endif
SUBROUTINE check(string,error,total_error)
@@ -119,7 +119,7 @@ CONTAINS
END SUBROUTINE check
!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$if defined(BUILD_HDF5_TEST_DLL)
!DEC$attributes dllexport :: verify
!DEC$endif
SUBROUTINE VERIFY(string,value,correct_value,total_error)
@@ -133,7 +133,7 @@ CONTAINS
END SUBROUTINE verify
!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$if defined(BUILD_HDF5_TEST_DLL)
!DEC$attributes dllexport :: verify_Fortran_INTEGER_4
!DEC$endif
SUBROUTINE verify_Fortran_INTEGER_4(string,value,correct_value,total_error)
@@ -150,7 +150,7 @@ CONTAINS
END SUBROUTINE verify_Fortran_INTEGER_4
!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$if defined(BUILD_HDF5_TEST_DLL)
!DEC$attributes dllexport :: verifyLogical
!DEC$endif
SUBROUTINE verifyLogical(string,value,correct_value,total_error)
@@ -165,7 +165,7 @@ CONTAINS
END SUBROUTINE verifyLogical
!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$if defined(BUILD_HDF5_TEST_DLL)
!DEC$attributes dllexport :: verifyString
!DEC$endif
SUBROUTINE verifyString(string, value,correct_value,total_error)
@@ -203,7 +203,7 @@ CONTAINS
SUBROUTINE h5_fixname_f(base_name, full_name, fapl, hdferr)
!
!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$if defined(BUILD_HDF5_TEST_DLL)
!DEC$attributes dllexport :: h5_fixname_f
!DEC$endif
USE H5GLOBAL
@@ -263,7 +263,7 @@ CONTAINS
SUBROUTINE h5_cleanup_f(base_name, fapl, hdferr)
!
!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$if defined(BUILD_HDF5_TEST_DLL)
!DEC$attributes dllexport :: h5_cleanup_f
!DEC$endif
USE H5GLOBAL
@@ -315,7 +315,7 @@ CONTAINS
SUBROUTINE h5_exit_f(status)
!
!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$if defined(BUILD_HDF5_TEST_DLL)
!DEC$attributes dllexport :: h5_exit_f
!DEC$endif
IMPLICIT NONE
@@ -352,7 +352,7 @@ CONTAINS
SUBROUTINE h5_env_nocleanup_f(HDF5_NOCLEANUP)
!
!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$if defined(BUILD_HDF5_TEST_DLL)
!DEC$attributes dllexport :: h5_env_nocleanup_f
!DEC$endif
IMPLICIT NONE
diff --git a/fortran/test/tf_F03.f90 b/fortran/test/tf_F03.f90
index 4513783..b3f1399 100644
--- a/fortran/test/tf_F03.f90
+++ b/fortran/test/tf_F03.f90
@@ -66,7 +66,7 @@ MODULE TH5_MISC_PROVISIONAL
CONTAINS
!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$if defined(BUILD_HDF5_TEST_DLL)
!DEC$attributes dllexport :: h5_sizeof_cmpd
!DEC$endif
INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CMPD(a)
@@ -78,7 +78,7 @@ CONTAINS
END FUNCTION H5_SIZEOF_CMPD
!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$if defined(BUILD_HDF5_TEST_DLL)
!DEC$attributes dllexport :: h5_sizeof_chr
!DEC$endif
INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CHR(a)
@@ -90,7 +90,7 @@ CONTAINS
END FUNCTION H5_SIZEOF_CHR
!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$if defined(BUILD_HDF5_TEST_DLL)
!DEC$attributes dllexport :: h5_sizeof_i
!DEC$endif
INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_I(a)
@@ -102,7 +102,7 @@ CONTAINS
END FUNCTION H5_SIZEOF_I
!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$if defined(BUILD_HDF5_TEST_DLL)
!DEC$attributes dllexport :: h5_sizeof_sp
!DEC$endif
INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_SP(a)
@@ -114,7 +114,7 @@ CONTAINS
END FUNCTION H5_SIZEOF_SP
!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$if defined(BUILD_HDF5_TEST_DLL)
!DEC$attributes dllexport :: h5_sizeof_dp
!DEC$endif
INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_DP(a)
diff --git a/fortran/test/tf_F08.f90 b/fortran/test/tf_F08.f90
index 5583f3f..20c2859 100644
--- a/fortran/test/tf_F08.f90
+++ b/fortran/test/tf_F08.f90
@@ -65,7 +65,7 @@ MODULE TH5_MISC_PROVISIONAL
CONTAINS
!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$if defined(BUILD_HDF5_TEST_DLL)
!DEC$attributes dllexport :: h5_sizeof_cmpd
!DEC$endif
INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CMPD(a)
@@ -77,7 +77,7 @@ CONTAINS
END FUNCTION H5_SIZEOF_CMPD
!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$if defined(BUILD_HDF5_TEST_DLL)
!DEC$attributes dllexport :: h5_sizeof_chr
!DEC$endif
INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CHR(a)
@@ -89,7 +89,7 @@ CONTAINS
END FUNCTION H5_SIZEOF_CHR
!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$if defined(BUILD_HDF5_TEST_DLL)
!DEC$attributes dllexport :: h5_sizeof_i
!DEC$endif
INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_I(a)
@@ -102,7 +102,7 @@ CONTAINS
!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$if defined(BUILD_HDF5_TEST_DLL)
!DEC$attributes dllexport :: h5_sizeof_sp
!DEC$endif
INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_SP(a)
@@ -114,7 +114,7 @@ CONTAINS
END FUNCTION H5_SIZEOF_SP
!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$if defined(BUILD_HDF5_TEST_DLL)
!DEC$attributes dllexport :: h5_sizeof_dp
!DEC$endif
INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_DP(a)