summaryrefslogtreecommitdiffstats
path: root/src/H5FDsubfiling
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5FDsubfiling')
-rw-r--r--src/H5FDsubfiling/CMakeLists.txt65
1 files changed, 36 insertions, 29 deletions
diff --git a/src/H5FDsubfiling/CMakeLists.txt b/src/H5FDsubfiling/CMakeLists.txt
index 89cd0c2..dd7f564 100644
--- a/src/H5FDsubfiling/CMakeLists.txt
+++ b/src/H5FDsubfiling/CMakeLists.txt
@@ -2,49 +2,56 @@ cmake_minimum_required (VERSION 3.18)
project (HDF5_H5FD_SUBFILING C)
# Sanity checking
-if (NOT H5FD_SOURCES)
- message (FATAL_ERROR "internal configure error - H5FD_SOURCES not set")
-endif ()
if (NOT H5FD_HDRS)
message (FATAL_ERROR "internal configure error - H5FD_HDRS not set")
endif ()
if (NOT H5FD_SUBFILING_DIR)
message (FATAL_ERROR "internal configure error - H5FD_SUBFILING_DIR not set")
endif ()
-if (NOT H5FD_SUBFILING_MERCURY_DIR)
- message (FATAL_ERROR "internal configure error - H5FD_SUBFILING_MERCURY_DIR not set")
-endif ()
-# Add mercury util sources to Subfiling VFD sources
-set (MERCURY_UTIL_SOURCES
- ${H5FD_SUBFILING_MERCURY_DIR}/mercury_thread.c
- ${H5FD_SUBFILING_MERCURY_DIR}/mercury_thread_condition.c
- ${H5FD_SUBFILING_MERCURY_DIR}/mercury_thread_pool.c
- ${H5FD_SUBFILING_MERCURY_DIR}/mercury_thread_mutex.c
-)
+if (HDF5_ENABLE_SUBFILING_VFD)
+ # Sanity checking
+ if (NOT H5FD_SOURCES)
+ message (FATAL_ERROR "internal configure error - H5FD_SOURCES not set")
+ endif ()
+ if (NOT H5FD_SUBFILING_MERCURY_DIR)
+ message (FATAL_ERROR "internal configure error - H5FD_SUBFILING_MERCURY_DIR not set")
+ endif ()
-set (HDF5_H5FD_SUBFILING_SOURCES
- ${H5FD_SUBFILING_DIR}/H5FDioc.c
- ${H5FD_SUBFILING_DIR}/H5FDioc_int.c
- ${H5FD_SUBFILING_DIR}/H5FDioc_threads.c
- ${H5FD_SUBFILING_DIR}/H5FDsubfiling.c
- ${H5FD_SUBFILING_DIR}/H5FDsubfile_int.c
- ${H5FD_SUBFILING_DIR}/H5subfiling_common.c
- ${MERCURY_UTIL_SOURCES}
-)
+ # Add mercury util sources to Subfiling VFD sources
+ set (MERCURY_UTIL_SOURCES
+ ${H5FD_SUBFILING_MERCURY_DIR}/mercury_thread.c
+ ${H5FD_SUBFILING_MERCURY_DIR}/mercury_thread_condition.c
+ ${H5FD_SUBFILING_MERCURY_DIR}/mercury_thread_pool.c
+ ${H5FD_SUBFILING_MERCURY_DIR}/mercury_thread_mutex.c
+ )
+
+ set (HDF5_H5FD_SUBFILING_SOURCES
+ ${H5FD_SUBFILING_DIR}/H5FDioc.c
+ ${H5FD_SUBFILING_DIR}/H5FDioc_int.c
+ ${H5FD_SUBFILING_DIR}/H5FDioc_threads.c
+ ${H5FD_SUBFILING_DIR}/H5FDsubfiling.c
+ ${H5FD_SUBFILING_DIR}/H5FDsubfile_int.c
+ ${H5FD_SUBFILING_DIR}/H5subfiling_common.c
+ ${MERCURY_UTIL_SOURCES}
+ )
+ # Add Subfiling VFD sources to HDF5 library's H5FD sources
+ set (H5FD_SOURCES
+ ${H5FD_SOURCES}
+ ${HDF5_H5FD_SUBFILING_SOURCES}
+ PARENT_SCOPE
+ )
+endif ()
+
+# Add Subfiling VFD public headers to HDF5 library's
+# public H5FD headers, even if the Subfiling VFD isn't
+# enabled and built
set (HDF5_H5FD_SUBFILING_HEADERS
${H5FD_SUBFILING_DIR}/H5FDsubfiling.h
${H5FD_SUBFILING_DIR}/H5FDioc.h
)
-# Add Subfiling VFD sources to HDF5 library's H5FD sources
-set (H5FD_SOURCES
- ${H5FD_SOURCES}
- ${HDF5_H5FD_SUBFILING_SOURCES}
- PARENT_SCOPE
-)
-
# Add Subfiling VFD public headers to HDF5 library's public H5FD headers
set (H5FD_HDRS
${H5FD_HDRS}