summaryrefslogtreecommitdiffstats
path: root/fortran/test
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2015-08-26 16:48:42 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2015-08-26 16:48:42 (GMT)
commit6635d4c003caf15aadc16b0453d71ca1b0e8ca1f (patch)
tree02ce0616569a6bb6fee59e6ddb9dbc4fe9cfc824 /fortran/test
parent2faae30c8db5e5155924e47b7267d04dd73b2152 (diff)
downloadhdf5-6635d4c003caf15aadc16b0453d71ca1b0e8ca1f.zip
hdf5-6635d4c003caf15aadc16b0453d71ca1b0e8ca1f.tar.gz
hdf5-6635d4c003caf15aadc16b0453d71ca1b0e8ca1f.tar.bz2
[svn-r27586] HDFFV-9497: Add back ALLOW_UNSUPPORTED OPTION.
Added new option SKIP_HDF5_FORTRAN_SHARED
Diffstat (limited to 'fortran/test')
-rw-r--r--fortran/test/CMakeLists.txt52
-rw-r--r--fortran/test/CMakeTests.cmake4
2 files changed, 28 insertions, 28 deletions
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 19d4975..49b8da8 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -22,7 +22,7 @@ set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES
LINKER_LANGUAGE C
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_library (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED t.c)
TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_F90_C_TEST_LIBSH_TARGET}
@@ -37,13 +37,13 @@ if (BUILD_SHARED_LIBS)
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
set_source_files_properties (tf.F90 ${HDF5_F90_BINARY_DIR}/tf_gen.F90 PROPERTIES LANGUAGE Fortran)
add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC tf.F90 ${HDF5_F90_BINARY_DIR}/tf_gen.F90)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_library (${HDF5_F90_TEST_LIBSH_TARGET} SHARED tf.F90 ${HDF5_F90_BINARY_DIR}/tf_gen.F90)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
TARGET_FORTRAN_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} STATIC " " " ")
target_link_libraries (${HDF5_F90_TEST_LIB_TARGET}
@@ -64,7 +64,7 @@ if (WIN32)
COMPILE_DEFINITIONS "HDF5F90_WINDOWS"
)
endif (WIN32)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
set (SHARED_LINK_FLAGS " ")
if (WIN32 AND MSVC)
set (SHARED_LINK_FLAGS "/DLL")
@@ -90,7 +90,7 @@ if (BUILD_SHARED_LIBS)
COMPILE_DEFINITIONS "BUILD_HDF5_TEST_DLL;HDF5F90_WINDOWS"
)
endif (WIN32)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
#-----------------------------------------------------------------------------
# Setup the Fortran auto-detection utilities
@@ -150,7 +150,7 @@ add_executable (testhdf5_fortran
)
TARGET_NAMING (testhdf5_fortran STATIC)
TARGET_FORTRAN_PROPERTIES (testhdf5_fortran STATIC " " " ")
-target_link_libraries (testhdf5_fortran
+target_link_libraries (testhdf5_fortran
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
@@ -164,7 +164,7 @@ set_target_properties (testhdf5_fortran PROPERTIES
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (testhdf5_fortran-shared
fortranlib_test.f90
tH5A.f90
@@ -184,7 +184,7 @@ if (BUILD_SHARED_LIBS)
)
TARGET_NAMING (testhdf5_fortran-shared SHARED)
TARGET_FORTRAN_PROPERTIES (testhdf5_fortran-shared SHARED " " " ")
- target_link_libraries (testhdf5_fortran-shared
+ target_link_libraries (testhdf5_fortran-shared
${HDF5_F90_TEST_LIBSH_TARGET}
${HDF5_F90_LIBSH_TARGET}
${HDF5_LIBSH_TARGET}
@@ -198,7 +198,7 @@ if (BUILD_SHARED_LIBS)
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
#-- Adding test for testhdf5_fortran_1_8
add_executable (testhdf5_fortran_1_8
@@ -211,7 +211,7 @@ add_executable (testhdf5_fortran_1_8
)
TARGET_NAMING (testhdf5_fortran_1_8 STATIC)
TARGET_FORTRAN_PROPERTIES (testhdf5_fortran_1_8 STATIC " " " ")
-target_link_libraries (testhdf5_fortran_1_8
+target_link_libraries (testhdf5_fortran_1_8
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
@@ -225,7 +225,7 @@ set_target_properties (testhdf5_fortran_1_8 PROPERTIES
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (testhdf5_fortran_1_8-shared
fortranlib_test_1_8.f90
tH5O.f90
@@ -236,7 +236,7 @@ if (BUILD_SHARED_LIBS)
)
TARGET_NAMING (testhdf5_fortran_1_8-shared SHARED)
TARGET_FORTRAN_PROPERTIES (testhdf5_fortran_1_8-shared SHARED " " " ")
- target_link_libraries (testhdf5_fortran_1_8-shared
+ target_link_libraries (testhdf5_fortran_1_8-shared
${HDF5_F90_TEST_LIBSH_TARGET}
${HDF5_F90_LIBSH_TARGET}
${HDF5_LIBSH_TARGET}
@@ -250,7 +250,7 @@ if (BUILD_SHARED_LIBS)
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
#-- Adding test for fortranlib_test_F03
add_executable (fortranlib_test_F03
@@ -265,7 +265,7 @@ add_executable (fortranlib_test_F03
)
TARGET_NAMING (fortranlib_test_F03 STATIC)
TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03 STATIC " " " ")
-target_link_libraries (fortranlib_test_F03
+target_link_libraries (fortranlib_test_F03
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
@@ -279,7 +279,7 @@ set_target_properties (fortranlib_test_F03 PROPERTIES
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (fortranlib_test_F03-shared
fortranlib_test_F03.f90
tH5E_F03.f90
@@ -292,7 +292,7 @@ if (BUILD_SHARED_LIBS)
)
TARGET_NAMING (fortranlib_test_F03-shared SHARED)
TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03-shared SHARED " " " ")
- target_link_libraries (fortranlib_test_F03-shared
+ target_link_libraries (fortranlib_test_F03-shared
${HDF5_F90_TEST_LIBSH_TARGET}
${HDF5_F90_LIBSH_TARGET}
${HDF5_LIBSH_TARGET}
@@ -306,13 +306,13 @@ if (BUILD_SHARED_LIBS)
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
#-- Adding test for fflush1
add_executable (fflush1 fflush1.f90)
TARGET_NAMING (fflush1 STATIC)
TARGET_FORTRAN_PROPERTIES (fflush1 STATIC " " " ")
-target_link_libraries (fflush1
+target_link_libraries (fflush1
${HDF5_F90_LIB_TARGET}
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_LIB_TARGET}
@@ -326,11 +326,11 @@ set_target_properties (fflush1 PROPERTIES
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (fflush1-shared fflush1.f90)
TARGET_NAMING (fflush1-shared SHARED)
TARGET_FORTRAN_PROPERTIES (fflush1-shared SHARED " " " ")
- target_link_libraries (fflush1-shared
+ target_link_libraries (fflush1-shared
${HDF5_F90_LIBSH_TARGET}
${HDF5_F90_TEST_LIBSH_TARGET}
${HDF5_LIBSH_TARGET}
@@ -344,13 +344,13 @@ if (BUILD_SHARED_LIBS)
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
#-- Adding test for fflush2
add_executable (fflush2 fflush2.f90)
TARGET_NAMING (fflush2 STATIC)
TARGET_FORTRAN_PROPERTIES (fflush2 STATIC " " " ")
-target_link_libraries (fflush2
+target_link_libraries (fflush2
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
@@ -364,11 +364,11 @@ set_target_properties (fflush2 PROPERTIES
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (fflush2-shared fflush2.f90)
TARGET_NAMING (fflush2-shared SHARED)
TARGET_FORTRAN_PROPERTIES (fflush2-shared SHARED " " " ")
- target_link_libraries (fflush2-shared
+ target_link_libraries (fflush2-shared
${HDF5_F90_TEST_LIBSH_TARGET}
${HDF5_F90_LIBSH_TARGET}
${HDF5_LIBSH_TARGET}
@@ -382,6 +382,6 @@ if (BUILD_SHARED_LIBS)
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
include (CMakeTests.cmake)
diff --git a/fortran/test/CMakeTests.cmake b/fortran/test/CMakeTests.cmake
index 94f6b64..154e70c 100644
--- a/fortran/test/CMakeTests.cmake
+++ b/fortran/test/CMakeTests.cmake
@@ -27,7 +27,7 @@ add_test (NAME FORTRAN_fflush1 COMMAND $<TARGET_FILE:fflush1>)
add_test (NAME FORTRAN_fflush2 COMMAND $<TARGET_FILE:fflush2>)
set_tests_properties (FORTRAN_fflush2 PROPERTIES DEPENDS FORTRAN_fflush1)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_test (NAME FORTRAN_testhdf5_fortran-shared COMMAND $<TARGET_FILE:testhdf5_fortran-shared>)
set_tests_properties (FORTRAN_testhdf5_fortran-shared PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
set_tests_properties (FORTRAN_testhdf5_fortran-shared PROPERTIES DEPENDS FORTRAN_testhdf5_fortran)
@@ -51,4 +51,4 @@ if (BUILD_SHARED_LIBS)
#-- Adding test for fflush2
add_test (NAME FORTRAN_fflush2-shared COMMAND $<TARGET_FILE:fflush2-shared>)
set_tests_properties (FORTRAN_fflush2-shared PROPERTIES DEPENDS FORTRAN_fflush1-shared)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)