Skip to content

Commit 1c1b410

Browse files
committed
CMake updates
1 parent 95f340d commit 1c1b410

File tree

2 files changed

+21
-10
lines changed

2 files changed

+21
-10
lines changed

CMakeLists.txt

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,17 @@ endif()
124124
#------------------------------------------------------------------------------
125125
# Locate MPI - currently just used for building VFD's tests
126126
#------------------------------------------------------------------------------
127-
find_package(MPI REQUIRED COMPONENTS C)
128-
set(HDF5_VFD_GDS_EXT_INCLUDE_DEPENDENCIES
129-
${HDF5_VFD_GDS_EXT_INCLUDE_DEPENDENCIES}
130-
${MPI_C_INCLUDE_DIRS}
131-
)
132-
set(HDF5_VFD_GDS_EXT_LIB_DEPENDENCIES
133-
${HDF5_VFD_GDS_EXT_LIB_DEPENDENCIES}
134-
${MPI_C_LIBRARIES}
135-
)
127+
if(HDF5_FOUND AND HDF5_IS_PARALLEL)
128+
find_package(MPI REQUIRED COMPONENTS C)
129+
set(HDF5_VFD_GDS_EXT_INCLUDE_DEPENDENCIES
130+
${HDF5_VFD_GDS_EXT_INCLUDE_DEPENDENCIES}
131+
${MPI_C_INCLUDE_DIRS}
132+
)
133+
set(HDF5_VFD_GDS_EXT_LIB_DEPENDENCIES
134+
${HDF5_VFD_GDS_EXT_LIB_DEPENDENCIES}
135+
${MPI_C_LIBRARIES}
136+
)
137+
endif()
136138

137139
#------------------------------------------------------------------------------
138140
# Version information
@@ -309,7 +311,7 @@ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src)
309311
#-----------------------------------------------------------------------------
310312
# Build doxygen documentation.
311313
#-----------------------------------------------------------------------------
312-
option(BUILD_DOCUMENTATION "Build documentation." OFF)
314+
option(BUILD_DOCUMENTATION "Build documentation." ON)
313315
#if(BUILD_DOCUMENTATION)
314316
# add_subdirectory(Documentation/Doxygen)
315317
#endif()

test/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,12 @@ foreach(vfd_test ${vfd_gds_tests})
4444
${HDF5_VFD_GDS_EXT_PKG_DEPENDENCIES}
4545
)
4646
endforeach()
47+
48+
#-----------------------------------------------------------------------------
49+
# Tests
50+
#-----------------------------------------------------------------------------
51+
foreach(vfd_test ${vfd_gds_tests})
52+
add_test(NAME "gds_vfd_test"
53+
COMMAND $<TARGET_FILE:${vfd_test}>
54+
)
55+
endforeach()

0 commit comments

Comments
 (0)