summaryrefslogtreecommitdiffstats
path: root/fortran/examples/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'fortran/examples/CMakeLists.txt')
-rw-r--r--fortran/examples/CMakeLists.txt14
1 files changed, 4 insertions, 10 deletions
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index 426df7e..8b7333a 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.2.2)
+cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_F90_EXAMPLES C CXX Fortran)
# --------------------------------------------------------------------
# Notes: When creating examples they should be prefixed
@@ -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}
@@ -52,9 +51,8 @@ foreach (example ${examples})
FOLDER examples/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
- if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+ 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}
@@ -83,9 +80,8 @@ foreach (example ${F2003_examples})
FOLDER examples/fortran03
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
- if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+ 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}
@@ -114,9 +109,8 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
FOLDER examples/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
- if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+ 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}