summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'fortran')
-rw-r--r--fortran/CMakeLists.txt9
-rw-r--r--fortran/examples/CMakeLists.txt2
-rw-r--r--fortran/test/CMakeLists.txt4
-rw-r--r--fortran/testpar/CMakeLists.txt4
4 files changed, 13 insertions, 6 deletions
diff --git a/fortran/CMakeLists.txt b/fortran/CMakeLists.txt
index 31edad2..9755963 100644
--- a/fortran/CMakeLists.txt
+++ b/fortran/CMakeLists.txt
@@ -23,8 +23,11 @@ endif ()
# Testing
#-----------------------------------------------------------------------------
if (BUILD_TESTING)
- add_subdirectory (test)
- if (MPI_Fortran_FOUND)
- add_subdirectory (testpar)
+ if (HDF5_TEST_SERIAL)
+ add_subdirectory (test)
+ endif ()
+ if (MPI_Fortran_FOUND AND HDF5_TEST_PARALLEL)
+ add_subdirectory (testpar)
+ endif ()
endif ()
endif ()
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index e8dddd3..be98963 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -173,6 +173,6 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
endif ()
endif ()
-if (BUILD_TESTING)
+if (BUILD_TESTING AND HDF5_TEST_FORTRAN AND HDF5_TEST_EXAMPLES)
include (CMakeTests.cmake)
endif ()
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 4efd8a8..97d2ff7 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -517,4 +517,6 @@ else ()
add_dependencies (vol_connector ${HDF5_F90_TEST_LIBSH_TARGET})
endif ()
-include (CMakeTests.cmake)
+if (HDF5_TEST_FORTRAN)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt
index 0fe641f..17aa6c3 100644
--- a/fortran/testpar/CMakeLists.txt
+++ b/fortran/testpar/CMakeLists.txt
@@ -45,4 +45,6 @@ set_target_properties (parallel_test PROPERTIES
)
endif ()
-include (CMakeTests.cmake)
+if (HDF5_TEST_FORTRAN AND HDF5_TEST_PARALLEL)
+ include (CMakeTests.cmake)
+endif ()