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.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index 6ecfd37..c051612 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -63,14 +63,14 @@ FOREACH (example ${examples})
ENDFOREACH (example ${examples})
+IF (FORTRAN_HAVE_ISO_C_BINDING AND HDF5_ENABLE_F2003)
FOREACH (example ${F2003_examples})
ADD_EXECUTABLE (f03_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
TARGET_NAMING (f03_ex_${example} ${LIB_TYPE})
TARGET_FORTRAN_WIN_PROPERTIES (f03_ex_${example} "")
IF (WIN32 AND NOT CYGWIN)
SET_PROPERTY (TARGET f03_ex_${example}
- APPEND PROPERTY COMPILE_DEFINITIONS
- HDF5F90_WINDOWS
+ APPEND PROPERTY COMPILE_DEFINITIONS HDF5F90_WINDOWS
)
ENDIF (WIN32 AND NOT CYGWIN)
TARGET_LINK_LIBRARIES (f03_ex_${example}
@@ -88,6 +88,7 @@ FOREACH (example ${F2003_examples})
ENDIF (BUILD_TESTING)
ENDFOREACH (example ${F2003_examples})
+ENDIF (FORTRAN_HAVE_ISO_C_BINDING AND HDF5_ENABLE_F2003)
IF (H5_HAVE_PARALLEL)