summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2023-01-24 17:39:13 (GMT)
committerGitHub <noreply@github.com>2023-01-24 17:39:13 (GMT)
commitd3b3324f6147a21536561623aa893c28a59e161d (patch)
tree5946f11a12a49f2ef05aa22be5b3b21758c88771
parentcf33347c045bde0fd280f91a3557281b4f2fb339 (diff)
downloadhdf5-d3b3324f6147a21536561623aa893c28a59e161d.zip
hdf5-d3b3324f6147a21536561623aa893c28a59e161d.tar.gz
hdf5-d3b3324f6147a21536561623aa893c28a59e161d.tar.bz2
skip the F2003 examples if F2003 was not enabled (#2416)
* skip F2003 examples if F2003 was not enabled * skip F2003 examples if F2003 was not enabled
-rw-r--r--fortran/examples/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index 2092dbe..74d2734 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -74,6 +74,9 @@ foreach (example ${examples})
endif ()
endforeach ()
+#-- Adding F2003 examples
+if (HDF5_ENABLE_F2003)
+
foreach (example ${F2003_examples})
add_executable (f03_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
target_compile_options(f03_ex_${example} PRIVATE $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>)
@@ -115,6 +118,8 @@ foreach (example ${F2003_examples})
endif ()
endforeach ()
+endif ()
+
if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
add_executable (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90)
target_compile_options(f90_ex_ph5example PRIVATE $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>)