summaryrefslogtreecommitdiffstats
path: root/hl/fortran
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2015-08-28 14:54:02 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2015-08-28 14:54:02 (GMT)
commit64452942afbde4b4cd75da34cbfe6a0ea56d67dc (patch)
tree2e1e5dab083e7fa813856db65d2118b9259d2476 /hl/fortran
parent4847daea86f57d35a683ef79cd8b772a4f463e02 (diff)
downloadhdf5-64452942afbde4b4cd75da34cbfe6a0ea56d67dc.zip
hdf5-64452942afbde4b4cd75da34cbfe6a0ea56d67dc.tar.gz
hdf5-64452942afbde4b4cd75da34cbfe6a0ea56d67dc.tar.bz2
[svn-r27603] HDFFV-9497: Add back ALLOW_UNSUPPORTED OPTION.
Added new option SKIP_HDF5_FORTRAN_SHARED. Adjust H5_HAVE_THREADSAFE only on SHARED libs.
Diffstat (limited to 'hl/fortran')
-rw-r--r--hl/fortran/src/CMakeLists.txt20
-rw-r--r--hl/fortran/test/CMakeLists.txt16
-rw-r--r--hl/fortran/test/CMakeTests.cmake8
3 files changed, 22 insertions, 22 deletions
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index 2af665c..cf9ade5 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -37,7 +37,7 @@ set_target_properties (${HDF5_HL_F90_C_LIB_TARGET} PROPERTIES
)
set (install_targets ${HDF5_HL_F90_C_LIB_TARGET})
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_library (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED ${HDF5_HL_F90_C_SRCS} ${HDF5_HL_F90_HEADERS})
TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_F90_C_LIBSH_TARGET} ${HDF5_HL_LIBSH_TARGET})
@@ -51,7 +51,7 @@ if (BUILD_SHARED_LIBS)
INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
)
set (install_targets ${install_targets} ${HDF5_HL_F90_C_LIBSH_TARGET})
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
#-----------------------------------------------------------------------------
# Fortran Modules
@@ -82,7 +82,7 @@ if (WIN32)
endif (WIN32)
set (install_targets ${install_targets} ${HDF5_HL_F90_LIB_TARGET})
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_library (${HDF5_HL_F90_LIBSH_TARGET} SHARED ${HDF5_HL_F90_F_SRCS})
set (SHARED_LINK_FLAGS " ")
if (WIN32 AND MSVC)
@@ -105,25 +105,25 @@ if (BUILD_SHARED_LIBS)
)
endif (WIN32)
set (install_targets ${install_targets} ${HDF5_HL_F90_LIBSH_TARGET})
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
if (WIN32)
set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/\${BUILD_TYPE})
else (WIN32)
set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
endif (WIN32)
-else (BUILD_SHARED_LIBS)
+else (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
if (WIN32)
set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/\${BUILD_TYPE})
else (WIN32)
set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
endif (WIN32)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
set (mod_files
${MOD_BUILD_DIR}/h5ds.mod
@@ -145,11 +145,11 @@ install (
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
if (HDF5_EXPORTED_TARGETS)
- if (BUILD_SHARED_LIBS)
+ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
INSTALL_TARGET_PDB (${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries)
#INSTALL_TARGET_PDB (${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries)
- endif (BUILD_SHARED_LIBS)
-
+ endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+
install (
TARGETS
${install_targets}
diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt
index 4918e06..d84ed4d 100644
--- a/hl/fortran/test/CMakeLists.txt
+++ b/hl/fortran/test/CMakeLists.txt
@@ -14,7 +14,7 @@ target_link_libraries (hl_f90_tstds ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TAR
target_include_directories (hl_f90_tstds PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
set_target_properties (hl_f90_tstds PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_tstds PROPERTIES FOLDER test/hl/fortran)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (hl_f90_tstds-shared tstds.f90)
TARGET_NAMING (hl_f90_tstds-shared SHARED)
TARGET_FORTRAN_PROPERTIES (hl_f90_tstds-shared SHARED " " " ")
@@ -25,7 +25,7 @@ if (BUILD_SHARED_LIBS)
FOLDER test/hl/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 hl_f90_tstlite
add_executable (hl_f90_tstlite tstlite.f90)
@@ -35,7 +35,7 @@ target_link_libraries (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_T
target_include_directories (hl_f90_tstlite PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
set_target_properties (hl_f90_tstlite PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_tstlite PROPERTIES FOLDER test/hl/fortran)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (hl_f90_tstlite-shared tstlite.f90)
TARGET_NAMING (hl_f90_tstlite-shared SHARED)
TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite-shared SHARED " " " ")
@@ -46,7 +46,7 @@ if (BUILD_SHARED_LIBS)
FOLDER test/hl/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 hl_f90_tstimage
add_executable (hl_f90_tstimage tstimage.f90)
@@ -56,7 +56,7 @@ target_link_libraries (hl_f90_tstimage ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB
target_include_directories (hl_f90_tstimage PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
set_target_properties (hl_f90_tstimage PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_tstimage PROPERTIES FOLDER test/hl/fortran)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (hl_f90_tstimage-shared tstimage.f90)
TARGET_NAMING (hl_f90_tstimage-shared SHARED)
TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage-shared SHARED " " " ")
@@ -67,7 +67,7 @@ if (BUILD_SHARED_LIBS)
FOLDER test/hl/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 hl_f90_tsttable
add_executable (hl_f90_tsttable tsttable.f90)
@@ -77,7 +77,7 @@ target_link_libraries (hl_f90_tsttable ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_
target_include_directories (hl_f90_tsttable PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
set_target_properties (hl_f90_tsttable PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_tsttable PROPERTIES FOLDER test/hl/fortran)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (hl_f90_tsttable-shared tsttable.f90)
TARGET_NAMING (hl_f90_tsttable-shared SHARED)
TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable-shared SHARED " " " ")
@@ -88,6 +88,6 @@ if (BUILD_SHARED_LIBS)
FOLDER test/hl/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/hl/fortran/test/CMakeTests.cmake b/hl/fortran/test/CMakeTests.cmake
index 38181bf..499e255 100644
--- a/hl/fortran/test/CMakeTests.cmake
+++ b/hl/fortran/test/CMakeTests.cmake
@@ -9,7 +9,7 @@
add_test (
NAME HL_FORTRAN_test-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
dsetf1.h5
dsetf2.h5
dsetf3.h5
@@ -32,11 +32,11 @@ set_tests_properties (HL_FORTRAN_f90_tstimage PROPERTIES DEPENDS HL_FORTRAN_test
add_test (NAME HL_FORTRAN_f90_tsttable COMMAND $<TARGET_FILE:hl_f90_tsttable>)
set_tests_properties (HL_FORTRAN_f90_tsttable PROPERTIES DEPENDS HL_FORTRAN_test-clear-objects)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_test (
NAME HL_FORTRAN_test-shared-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
dsetf1.h5
dsetf2.h5
dsetf3.h5
@@ -61,4 +61,4 @@ if (BUILD_SHARED_LIBS)
add_test (NAME HL_FORTRAN_f90_tsttable-shared COMMAND $<TARGET_FILE:hl_f90_tsttable-shared>)
set_tests_properties (HL_FORTRAN_f90_tsttable-shared PROPERTIES DEPENDS HL_FORTRAN_test-shared-clear-objects)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)