summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-01-22 17:22:27 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-01-22 17:22:27 (GMT)
commit233afe3b6f77a487baed555569ee0524ca7a4d24 (patch)
treebd247af8868be2a861374ce3a3d670547c62548f /fortran
parenta3afda29f501e166d4d40ef1ad1fd320dbfe1974 (diff)
downloadhdf5-233afe3b6f77a487baed555569ee0524ca7a4d24.zip
hdf5-233afe3b6f77a487baed555569ee0524ca7a4d24.tar.gz
hdf5-233afe3b6f77a487baed555569ee0524ca7a4d24.tar.bz2
HDFFV-10385,10392,10393 merge from develop
Diffstat (limited to 'fortran')
-rw-r--r--fortran/examples/CMakeLists.txt6
-rw-r--r--fortran/src/CMakeLists.txt10
-rw-r--r--fortran/test/CMakeLists.txt44
-rw-r--r--fortran/testpar/CMakeLists.txt1
4 files changed, 22 insertions, 39 deletions
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index a05f296..a48b3bd 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -40,7 +40,6 @@ set (F2003_examples
foreach (example ${examples})
add_executable (f90_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
- TARGET_NAMING (f90_ex_${example} STATIC)
TARGET_FORTRAN_PROPERTIES (f90_ex_${example} STATIC " " " ")
target_link_libraries (f90_ex_${example}
${HDF5_F90_LIB_TARGET}
@@ -54,7 +53,6 @@ foreach (example ${examples})
)
if (BUILD_SHARED_LIBS)
add_executable (f90_ex_${example}-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
- TARGET_NAMING (f90_ex_${example}-shared SHARED)
TARGET_FORTRAN_PROPERTIES (f90_ex_${example}-shared SHARED " " " ")
target_link_libraries (f90_ex_${example}-shared
${HDF5_F90_LIBSH_TARGET}
@@ -71,7 +69,6 @@ endforeach ()
foreach (example ${F2003_examples})
add_executable (f03_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
- TARGET_NAMING (f03_ex_${example} STATIC)
TARGET_FORTRAN_PROPERTIES (f03_ex_${example} STATIC " " " ")
target_link_libraries (f03_ex_${example}
${HDF5_F90_LIB_TARGET}
@@ -85,7 +82,6 @@ foreach (example ${F2003_examples})
)
if (BUILD_SHARED_LIBS)
add_executable (f03_ex_${example}-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
- TARGET_NAMING (f03_ex_${example}-shared SHARED)
TARGET_FORTRAN_PROPERTIES (f03_ex_${example}-shared SHARED " " " ")
target_link_libraries (f03_ex_${example}-shared
${HDF5_F90_LIBSH_TARGET}
@@ -102,7 +98,6 @@ endforeach ()
if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
add_executable (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90)
- TARGET_NAMING (f90_ex_ph5example STATIC)
TARGET_FORTRAN_PROPERTIES (f90_ex_ph5example STATIC " " " ")
target_link_libraries (f90_ex_ph5example
${HDF5_F90_LIB_TARGET}
@@ -116,7 +111,6 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
)
if (BUILD_SHARED_LIBS)
add_executable (f90_ex_ph5example-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90)
- TARGET_NAMING (f90_ex_ph5example-shared SHARED)
TARGET_FORTRAN_PROPERTIES (f90_ex_ph5example-shared SHARED " " " ")
target_link_libraries (f90_ex_ph5example-shared
${HDF5_F90_LIBSH_TARGET}
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index c377d62..b664c50 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -66,12 +66,12 @@ set_target_properties (H5_buildiface PROPERTIES
if (BUILD_SHARED_LIBS)
file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/shared")
- set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF5_CFG_BUILD_TYPE})
+ set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF_CFG_BUILD_TYPE})
endif ()
file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/static")
-set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF5_CFG_BUILD_TYPE})
+set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF_CFG_BUILD_TYPE})
-INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY})
+INCLUDE_DIRECTORIES (${HDF5_F90_SOURCE_DIR} ${HDF5_F90_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY})
#-----------------------------------------------------------------------------
add_executable (H5match_types
@@ -134,7 +134,7 @@ set (f90CStub_C_SHHDRS
)
add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS})
-target_include_directories(${HDF5_F90_C_LIB_TARGET} PRIVATE ${HDF5_F90_BINARY_DIR}/static)
+target_include_directories(${HDF5_F90_C_LIB_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/static)
TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} STATIC " " " ")
target_link_libraries (${HDF5_F90_C_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIB_TARGET}")
@@ -148,7 +148,7 @@ set (install_targets ${HDF5_F90_C_LIB_TARGET})
if (BUILD_SHARED_LIBS)
add_library (${HDF5_F90_C_LIBSH_TARGET} SHARED ${f90CStub_C_SOURCES} ${f90CStub_C_SHHDRS})
- target_include_directories(${HDF5_F90_C_LIBSH_TARGET} PRIVATE ${HDF5_F90_BINARY_DIR}/shared)
+ target_include_directories(${HDF5_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/shared)
TARGET_C_PROPERTIES (${HDF5_F90_C_LIBSH_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIBSH_TARGET}")
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 9946aa0..2990bcc 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -4,7 +4,7 @@ PROJECT (HDF5_FORTRAN_TESTS C CXX Fortran)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
-INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
+INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_FORTRAN_TESTS_SOURCE_DIR} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
#-----------------------------------------------------------------------------
# Setup the Fortran auto-detection utilities
@@ -33,18 +33,18 @@ set_target_properties (H5_test_buildiface PROPERTIES
)
if (BUILD_SHARED_LIBS)
- file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/shared")
- set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF5_CFG_BUILD_TYPE})
+ file (MAKE_DIRECTORY "${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared")
+ set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF_CFG_BUILD_TYPE})
endif ()
-file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/static")
-set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF5_CFG_BUILD_TYPE})
+file (MAKE_DIRECTORY "${HDF5_FORTRAN_TESTS_BINARY_DIR}/static")
+set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF_CFG_BUILD_TYPE})
#-----------------------------------------------------------------------------
# Add Test Lib
#-----------------------------------------------------------------------------
add_library (${HDF5_F90_C_TEST_LIB_TARGET} STATIC t.c)
set_source_files_properties (t.c PROPERTIES LANGUAGE C)
-target_include_directories(${HDF5_F90_C_TEST_LIB_TARGET} PRIVATE ${HDF5_F90_BINARY_DIR}/static)
+target_include_directories(${HDF5_F90_C_TEST_LIB_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/static)
TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIB_TARGET} STATIC " " " ")
target_link_libraries (${HDF5_F90_C_TEST_LIB_TARGET}
${HDF5_F90_C_LIB_TARGET}
@@ -58,7 +58,7 @@ set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES
)
if (BUILD_SHARED_LIBS)
add_library (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED t.c)
- target_include_directories(${HDF5_F90_C_TEST_LIBSH_TARGET} PRIVATE ${HDF5_F90_BINARY_DIR}/shared)
+ target_include_directories(${HDF5_F90_C_TEST_LIBSH_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/shared)
TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_F90_C_TEST_LIBSH_TARGET}
${HDF5_F90_C_LIBSH_TARGET}
@@ -76,35 +76,35 @@ endif ()
set (CMD $<TARGET_FILE:H5_test_buildiface>)
add_custom_command (
- OUTPUT ${HDF5_F90_BINARY_DIR}/static/tf_gen.F90
+ OUTPUT ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90
COMMAND ${CMD}
- WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static
+ WORKING_DIRECTORY ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static
DEPENDS H5_test_buildiface
COMMENT "Generating the tf_gen.F90 file"
)
add_custom_target (H5testgen ALL
- DEPENDS ${HDF5_F90_BINARY_DIR}/static/tf_gen.F90
+ DEPENDS ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90
)
-set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/tf_gen.F90 PROPERTIES GENERATED TRUE)
+set_source_files_properties (${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90 PROPERTIES GENERATED TRUE)
if (BUILD_SHARED_LIBS)
set (CMDSH $<TARGET_FILE:H5_test_buildiface>)
add_custom_command (
- OUTPUT ${HDF5_F90_BINARY_DIR}/shared/tf_gen.F90
+ OUTPUT ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared/tf_gen.F90
COMMAND ${CMDSH}
- WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/shared
+ WORKING_DIRECTORY ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared
DEPENDS H5_test_buildiface
COMMENT "Generating the tf_gen.F90 shared file"
)
add_custom_target (H5testgenSH ALL
- DEPENDS ${HDF5_F90_BINARY_DIR}/shared/tf_gen.F90
+ DEPENDS ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared/tf_gen.F90
)
- set_source_files_properties (${HDF5_F90_BINARY_DIR}/shared/tf_gen.F90 PROPERTIES GENERATED TRUE)
+ set_source_files_properties (${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared/tf_gen.F90 PROPERTIES GENERATED TRUE)
endif ()
set (HDF5_F90_TF_SOURCES
# generated files
- ${HDF5_F90_BINARY_DIR}/static/tf_gen.F90
+ ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90
# normal distribution
tf.F90
@@ -113,7 +113,7 @@ set_source_files_properties (${HDF5_F90_TF_SOURCES} PROPERTIES LANGUAGE Fortran)
if (BUILD_SHARED_LIBS)
set (HDF5_F90_TF_SOURCES_SHARED
# generated file
- ${HDF5_F90_BINARY_DIR}/shared/tf_gen.F90
+ ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared/tf_gen.F90
# normal distribution
tf.F90
@@ -195,7 +195,6 @@ add_executable (testhdf5_fortran
tH5Z.F90
tHDF5.F90
)
-TARGET_NAMING (testhdf5_fortran STATIC)
TARGET_FORTRAN_PROPERTIES (testhdf5_fortran STATIC " " " ")
target_link_libraries (testhdf5_fortran
${HDF5_F90_TEST_LIB_TARGET}
@@ -231,7 +230,6 @@ if (BUILD_SHARED_LIBS)
tH5Z.F90
tHDF5.F90
)
- TARGET_NAMING (testhdf5_fortran-shared SHARED)
TARGET_FORTRAN_PROPERTIES (testhdf5_fortran-shared SHARED " " " ")
target_link_libraries (testhdf5_fortran-shared
${HDF5_F90_TEST_LIBSH_TARGET}
@@ -259,7 +257,6 @@ add_executable (testhdf5_fortran_1_8
tH5MISC_1_8.F90
tHDF5_1_8.F90
)
-TARGET_NAMING (testhdf5_fortran_1_8 STATIC)
TARGET_FORTRAN_PROPERTIES (testhdf5_fortran_1_8 STATIC " " " ")
target_link_libraries (testhdf5_fortran_1_8
${HDF5_F90_TEST_LIB_TARGET}
@@ -286,7 +283,6 @@ if (BUILD_SHARED_LIBS)
tH5MISC_1_8.F90
tHDF5_1_8.F90
)
- 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
${HDF5_F90_TEST_LIBSH_TARGET}
@@ -316,7 +312,6 @@ add_executable (fortranlib_test_F03
tH5T_F03.F90
tHDF5_F03.F90
)
-TARGET_NAMING (fortranlib_test_F03 STATIC)
TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03 STATIC " " " ")
target_link_libraries (fortranlib_test_F03
${HDF5_F90_TEST_LIB_TARGET}
@@ -345,7 +340,6 @@ if (BUILD_SHARED_LIBS)
tH5T_F03.F90
tHDF5_F03.F90
)
- TARGET_NAMING (fortranlib_test_F03-shared SHARED)
TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03-shared SHARED " " " ")
target_link_libraries (fortranlib_test_F03-shared
${HDF5_F90_TEST_LIBSH_TARGET}
@@ -367,7 +361,6 @@ endif ()
#-- Adding test for fflush1
add_executable (fflush1 fflush1.F90)
-TARGET_NAMING (fflush1 STATIC)
TARGET_FORTRAN_PROPERTIES (fflush1 STATIC " " " ")
target_link_libraries (fflush1
${HDF5_F90_LIB_TARGET}
@@ -387,7 +380,6 @@ add_dependencies (fflush1 ${HDF5_F90_TEST_LIB_TARGET})
if (BUILD_SHARED_LIBS)
add_executable (fflush1-shared fflush1.F90)
- TARGET_NAMING (fflush1-shared SHARED)
TARGET_FORTRAN_PROPERTIES (fflush1-shared SHARED " " " ")
target_link_libraries (fflush1-shared
${HDF5_F90_LIBSH_TARGET}
@@ -408,7 +400,6 @@ endif ()
#-- Adding test for fflush2
add_executable (fflush2 fflush2.F90)
-TARGET_NAMING (fflush2 STATIC)
TARGET_FORTRAN_PROPERTIES (fflush2 STATIC " " " ")
target_link_libraries (fflush2
${HDF5_F90_TEST_LIB_TARGET}
@@ -428,7 +419,6 @@ add_dependencies (fflush2 ${HDF5_F90_TEST_LIB_TARGET})
if (BUILD_SHARED_LIBS)
add_executable (fflush2-shared fflush2.F90)
- TARGET_NAMING (fflush2-shared SHARED)
TARGET_FORTRAN_PROPERTIES (fflush2-shared SHARED " " " ")
target_link_libraries (fflush2-shared
${HDF5_F90_TEST_LIBSH_TARGET}
diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt
index 4aa7f43..ed9d28c 100644
--- a/fortran/testpar/CMakeLists.txt
+++ b/fortran/testpar/CMakeLists.txt
@@ -16,7 +16,6 @@ add_executable (parallel_test
hyper.f90
mdset.f90
)
-TARGET_NAMING (parallel_test STATIC)
TARGET_FORTRAN_PROPERTIES (parallel_test STATIC " " " ")
target_link_libraries (parallel_test
${HDF5_F90_TEST_LIB_TARGET}