summaryrefslogtreecommitdiffstats
path: root/HDF5Examples/FORTRAN
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2023-12-14 18:50:30 (GMT)
committerGitHub <noreply@github.com>2023-12-14 18:50:30 (GMT)
commit6f2d22d86e6a265535efe22a8bb3872b3b32a52b (patch)
treef79e0d9778b13466282c159dfec67d31faba5b8d /HDF5Examples/FORTRAN
parent184445f4a45c602887ca0624c5295a7b6fea2d21 (diff)
downloadhdf5-6f2d22d86e6a265535efe22a8bb3872b3b32a52b.zip
hdf5-6f2d22d86e6a265535efe22a8bb3872b3b32a52b.tar.gz
hdf5-6f2d22d86e6a265535efe22a8bb3872b3b32a52b.tar.bz2
Add variable option syncing for examples (#3885)
Diffstat (limited to 'HDF5Examples/FORTRAN')
-rw-r--r--HDF5Examples/FORTRAN/CMakeLists.txt2
-rw-r--r--HDF5Examples/FORTRAN/H5D/CMakeLists.txt8
-rw-r--r--HDF5Examples/FORTRAN/H5G/CMakeLists.txt8
-rw-r--r--HDF5Examples/FORTRAN/H5PAR/CMakeLists.txt10
-rw-r--r--HDF5Examples/FORTRAN/H5T/CMakeLists.txt15
5 files changed, 26 insertions, 17 deletions
diff --git a/HDF5Examples/FORTRAN/CMakeLists.txt b/HDF5Examples/FORTRAN/CMakeLists.txt
index 72582fe..0f05a0e 100644
--- a/HDF5Examples/FORTRAN/CMakeLists.txt
+++ b/HDF5Examples/FORTRAN/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.12)
-PROJECT (HDF5Examples_F90 C CXX Fortran)
+PROJECT (HDF5Examples_F90 Fortran)
#-----------------------------------------------------------------------------
# Build the Fortran Examples
diff --git a/HDF5Examples/FORTRAN/H5D/CMakeLists.txt b/HDF5Examples/FORTRAN/H5D/CMakeLists.txt
index dbc126c..5369a49 100644
--- a/HDF5Examples/FORTRAN/H5D/CMakeLists.txt
+++ b/HDF5Examples/FORTRAN/H5D/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.12)
-project (HDF5Examples_FORTRAN_H5D C CXX Fortran)
+project (HDF5Examples_FORTRAN_H5D Fortran)
# --------------------------------------------------------------------
# Notes: When creating examples they should be prefixed
@@ -10,7 +10,7 @@ project (HDF5Examples_FORTRAN_H5D C CXX Fortran)
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (
- ${CMAKE_Fortran_MODULE_DIRECTORY}
+ ${CMAKE_Fortran_MODULE_DIRECTORY}${HDF_MOD_EXT}
${PROJECT_BINARY_DIR}
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
)
@@ -35,7 +35,7 @@ foreach (example_name ${common_examples})
if (H5_HAVE_PARALLEL)
target_include_directories (${EXAMPLE_VARNAME}_f90_${example_name} PUBLIC ${MPI_Fortran_INCLUDE_DIRS})
endif ()
- target_link_libraries (${EXAMPLE_VARNAME}_f90_${example_name} ${LINK_Fortran_LIBS})
+ target_link_libraries (${EXAMPLE_VARNAME}_f90_${example_name} ${H5EX_LINK_Fortran_LIBS})
set_target_properties (${EXAMPLE_VARNAME}_f90_${example_name} PROPERTIES LINKER_LANGUAGE Fortran)
if (H5EX_BUILD_TESTING)
if (${example_name} STREQUAL "h5ex_d_alloc")
@@ -80,7 +80,7 @@ if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.10")
if (H5_HAVE_PARALLEL)
target_include_directories (${EXAMPLE_VARNAME}_f90_${example_name} PUBLIC ${MPI_C_INCLUDE_DIRS})
endif ()
- target_link_libraries (${EXAMPLE_VARNAME}_f90_${example_name} ${H5EX_HDF5_LINK_LIBS})
+ target_link_libraries (${EXAMPLE_VARNAME}_f90_${example_name} ${H5EX_LINK_Fortran_LIBS})
if (H5EX_BUILD_TESTING)
add_custom_command (
TARGET ${EXAMPLE_VARNAME}_f90_${example_name}
diff --git a/HDF5Examples/FORTRAN/H5G/CMakeLists.txt b/HDF5Examples/FORTRAN/H5G/CMakeLists.txt
index d2587e0..508283c 100644
--- a/HDF5Examples/FORTRAN/H5G/CMakeLists.txt
+++ b/HDF5Examples/FORTRAN/H5G/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.12)
-project (HDF5Examples_FORTRAN_H5G C CXX Fortran)
+project (HDF5Examples_FORTRAN_H5G Fortran)
# --------------------------------------------------------------------
# Notes: When creating examples they should be prefixed
@@ -10,7 +10,7 @@ project (HDF5Examples_FORTRAN_H5G C CXX Fortran)
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (
- ${CMAKE_Fortran_MODULE_DIRECTORY}
+ ${CMAKE_Fortran_MODULE_DIRECTORY}${HDF_MOD_EXT}
${PROJECT_BINARY_DIR}
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
)
@@ -35,7 +35,7 @@ foreach (example_name ${common_examples})
if (H5_HAVE_PARALLEL)
target_include_directories (${EXAMPLE_VARNAME}_f90_${example_name} PUBLIC ${MPI_Fortran_INCLUDE_DIRS})
endif ()
- target_link_libraries (${EXAMPLE_VARNAME}_f90_${example_name} ${LINK_Fortran_LIBS})
+ target_link_libraries (${EXAMPLE_VARNAME}_f90_${example_name} ${H5EX_LINK_Fortran_LIBS})
set_target_properties (${EXAMPLE_VARNAME}_f90_${example_name} PROPERTIES LINKER_LANGUAGE Fortran)
if (H5EX_BUILD_TESTING)
if (NOT ${example_name} STREQUAL "h5ex_g_create" AND NOT ${example_name} STREQUAL "h5ex_g_compact")
@@ -64,7 +64,7 @@ endforeach ()
# if (H5_HAVE_PARALLEL)
# target_include_directories (${EXAMPLE_VARNAME}_f90_${example_name} PUBLIC ${MPI_C_INCLUDE_DIRS})
# endif ()
-# target_link_libraries (${EXAMPLE_VARNAME}_f90_${example_name} ${H5EX_HDF5_LINK_LIBS})
+# target_link_libraries (${EXAMPLE_VARNAME}_f90_${example_name} ${H5EX_LINK_Fortran_LIBS})
# if (H5EX_BUILD_TESTING)
# add_custom_command (
# TARGET ${EXAMPLE_VARNAME}_f90_${example_name}
diff --git a/HDF5Examples/FORTRAN/H5PAR/CMakeLists.txt b/HDF5Examples/FORTRAN/H5PAR/CMakeLists.txt
index 84c9641..792caaf 100644
--- a/HDF5Examples/FORTRAN/H5PAR/CMakeLists.txt
+++ b/HDF5Examples/FORTRAN/H5PAR/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.12)
-project (HDF5Examples_FORTRAN_H5PAR C CXX Fortran)
+project (HDF5Examples_FORTRAN_H5PAR Fortran)
# --------------------------------------------------------------------
# Notes: When creating examples they should be prefixed
@@ -10,7 +10,7 @@ project (HDF5Examples_FORTRAN_H5PAR C CXX Fortran)
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (
- ${CMAKE_Fortran_MODULE_DIRECTORY}
+ ${CMAKE_Fortran_MODULE_DIRECTORY}${HDF_MOD_EXT}
${PROJECT_BINARY_DIR}
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
)
@@ -33,7 +33,7 @@ foreach (example_name ${examples})
"$<$<BOOL:${${EXAMPLE_VARNAME}_USE_116_API}>:-DH5_USE_116_API>"
)
target_include_directories (${EXAMPLE_VARNAME}_f90_${example_name} PUBLIC ${MPI_Fortran_INCLUDE_DIRS})
- target_link_libraries (${EXAMPLE_VARNAME}_f90_${example_name} ${LINK_Fortran_LIBS})
+ target_link_libraries (${EXAMPLE_VARNAME}_f90_${example_name} ${H5EX_LINK_Fortran_LIBS})
set_target_properties (${EXAMPLE_VARNAME}_f90_${example_name} PROPERTIES LINKER_LANGUAGE Fortran)
endforeach ()
@@ -59,8 +59,8 @@ if (H5EX_BUILD_TESTING)
-D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_LIB_DIRECTORY}"
-P "${${EXAMPLE_PACKAGE_NAME}_RESOURCES_DIR}/grepTest.cmake"
)
- set_tests_properties (${EXAMPLE_VARNAME}_${testname} PROPERTIES DEPENDS ${EXAMPLE_VARNAME}_${testname}-clearall)
- set (last_test "${EXAMPLE_VARNAME}_${testname}")
+ set_tests_properties (${EXAMPLE_VARNAME}_f90_${testname} PROPERTIES DEPENDS ${EXAMPLE_VARNAME}_f90_${testname}-clearall)
+ set (last_test "${EXAMPLE_VARNAME}_f90_${testname}")
endmacro ()
# Ensure that 24 is a multiple of the number of processes.
diff --git a/HDF5Examples/FORTRAN/H5T/CMakeLists.txt b/HDF5Examples/FORTRAN/H5T/CMakeLists.txt
index 67a3ca3..262adf8 100644
--- a/HDF5Examples/FORTRAN/H5T/CMakeLists.txt
+++ b/HDF5Examples/FORTRAN/H5T/CMakeLists.txt
@@ -1,5 +1,14 @@
cmake_minimum_required (VERSION 3.12)
-project (HDF5Examples_FORTRAN_H5T C CXX Fortran)
+project (HDF5Examples_FORTRAN_H5T Fortran)
+
+#-----------------------------------------------------------------------------
+# Setup include Directories
+#-----------------------------------------------------------------------------
+INCLUDE_DIRECTORIES (
+ ${CMAKE_Fortran_MODULE_DIRECTORY}${HDF_MOD_EXT}
+ ${PROJECT_BINARY_DIR}
+ ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
+)
#-----------------------------------------------------------------------------
# Define Sources
@@ -21,7 +30,7 @@ include (Fortran_sourcefiles.cmake)
if (H5_HAVE_PARALLEL)
target_include_directories (${EXAMPLE_VARNAME}_f90_${example_name} PUBLIC ${MPI_Fortran_INCLUDE_DIRS})
endif ()
- target_link_libraries (${EXAMPLE_VARNAME}_f90_${example_name} ${LINK_Fortran_LIBS})
+ target_link_libraries (${EXAMPLE_VARNAME}_f90_${example_name} ${H5EX_LINK_Fortran_LIBS})
set_target_properties (${EXAMPLE_VARNAME}_f90_${example_name} PROPERTIES LINKER_LANGUAGE Fortran)
if (H5EX_BUILD_TESTING)
add_custom_command (
@@ -48,7 +57,7 @@ foreach (example_name ${common_examples})
if (H5_HAVE_PARALLEL)
target_include_directories (${EXAMPLE_VARNAME}_f90_${example_name} PUBLIC ${MPI_Fortran_INCLUDE_DIRS})
endif ()
- target_link_libraries (${EXAMPLE_VARNAME}_f90_${example_name} ${LINK_Fortran_LIBS})
+ target_link_libraries (${EXAMPLE_VARNAME}_f90_${example_name} ${H5EX_LINK_Fortran_LIBS})
set_target_properties (${EXAMPLE_VARNAME}_f90_${example_name} PROPERTIES LINKER_LANGUAGE Fortran)
if (H5EX_BUILD_TESTING)
add_custom_command (