Add options to enable or disable building tools and tests. The default

is enabled for each.
This commit is contained in:
Larry Knox 2019-06-05 23:20:01 -05:00
parent 4af633d1c4
commit 54a07f556c
9 changed files with 124 additions and 19 deletions

View File

@ -49,11 +49,6 @@ include $(top_srcdir)/config/commence.am
# Conditionals. These conditionals are defined during configure
# Define each variable to empty if it is not used to placate pmake
if BUILD_PARALLEL_CONDITIONAL
TESTPARALLEL_DIR =testpar
else
TESTPARALLEL_DIR=
endif
if BUILD_CXX_CONDITIONAL
CXX_DIR =c++
else
@ -74,9 +69,24 @@ if BUILD_HDF5_HL_CONDITIONAL
else
HDF5_HL_DIR=
endif
if BUILD_TESTS_CONDITIONAL
TESTSERIAL_DIR =test
else
TESTSERIAL_DIR=
endif
if BUILD_TESTS_PARALLEL_CONDITIONAL
TESTPARALLEL_DIR =testpar
else
TESTPARALLEL_DIR=
endif
if BUILD_TOOLS_CONDITIONAL
TOOLS_DIR =tools
else
TOOLS_DIR=
endif
SUBDIRS = src test $(TESTPARALLEL_DIR) tools . $(CXX_DIR) $(FORTRAN_DIR) \
$(JAVA_DIR) $(HDF5_HL_DIR)
SUBDIRS = src $(TESTSERIAL_DIR) $(TESTPARALLEL_DIR) $(TOOLS_DIR) . $(CXX_DIR) \
$(FORTRAN_DIR) $(JAVA_DIR) $(HDF5_HL_DIR)
DIST_SUBDIRS = src test testpar tools . c++ fortran hl examples java
# Some files generated during configure that should be cleaned

View File

@ -18,9 +18,15 @@
include $(top_srcdir)/config/commence.am
if BUILD_TESTS_CONDITIONAL
TEST_DIR = test
else
TEST_DIR=
endif
## Only recurse into subdirectories if C++ interface is enabled.
if BUILD_CXX_CONDITIONAL
SUBDIRS=src test
SUBDIRS=src $(TEST_DIR)
# Test with just the native connector, with a single pass-through connector
# and with a doubly-stacked pass-through.

View File

@ -942,6 +942,48 @@ fi
AM_CONDITIONAL([FORTRAN_SHARED_CONDITIONAL], [test "X$H5_FORTRAN_SHARED" = "Xyes"])
## ----------------------------------------------------------------------
## Check if they would like to disable building tests
##
## This needs to be exposed for the library info file.
AC_SUBST([HDF5_TESTS])
## Default is to build tests
HDF5_TESTS=yes
AC_MSG_CHECKING([if building tests is disabled])
AC_ARG_ENABLE([tests],
[AS_HELP_STRING([--enable-tests],
[Compile the HDF5 tests [default=yes]])],
[HDF5_TESTS=$enableval])
if test "X$HDF5_TESTS" = "Xno"; then
echo "Building HDF5 tests is disabled"
fi
## ----------------------------------------------------------------------
## Check if they would like to disable building tools
##
## This needs to be exposed for the library info file.
AC_SUBST([HDF5_TOOLS])
## Default is to build tests and tools
HDF5_TOOLS=yes
AC_MSG_CHECKING([if building tools is disabled])
AC_ARG_ENABLE([tools],
[AS_HELP_STRING([--enable-tools],
[Compile the HDF5 tools [default=yes]])],
[HDF5_TOOLS=$enableval])
if test "X$HDF5_TOOLS" = "Xno"; then
echo "Building HDF5 tools is disabled"
fi
## ----------------------------------------------------------------------
## Create libtool. If shared/static libraries are going to be enabled
## or disabled, it should happen before these macros.
@ -2511,8 +2553,10 @@ AC_SUBST([PARALLEL_FILTERED_WRITES])
AC_SUBST([LARGE_PARALLEL_IO])
if test -n "$PARALLEL"; then
## The 'testpar' directory should participate in the build
TESTPARALLEL=testpar
if test "X$HDF5_TESTS" = "Xyes"; then
## The 'testpar' directory should participate in the build
TESTPARALLEL=testpar
fi
## We are building a parallel library
AC_DEFINE([HAVE_PARALLEL], [1], [Define if we have parallel support])
@ -3361,11 +3405,13 @@ LDFLAGS="$saved_user_LDFLAGS"
## need to be compiled
AM_CONDITIONAL([BUILD_CXX_CONDITIONAL], [test "X$HDF_CXX" = "Xyes"])
AM_CONDITIONAL([BUILD_PARALLEL_CONDITIONAL], [test -n "$TESTPARALLEL"])
AM_CONDITIONAL([BUILD_PARALLEL_CONDITIONAL], [test "X$PARALLEL" = "Xyes"])
AM_CONDITIONAL([BUILD_FORTRAN_CONDITIONAL], [test "X$HDF_FORTRAN" = "Xyes"])
AM_CONDITIONAL([BUILD_JAVA_CONDITIONAL], [test "X$HDF_JAVA" = "Xyes"])
AM_CONDITIONAL([BUILD_HDF5_HL_CONDITIONAL], [test "X$HDF5_HL" = "Xyes"])
AM_CONDITIONAL([BUILD_TESTS_CONDITIONAL], [test "X$HDF5_TESTS" = "Xyes"])
AM_CONDITIONAL([BUILD_TESTS_PARALLEL_CONDITIONAL], [test -n "$TESTPARALLEL"])
AM_CONDITIONAL([BUILD_TOOLS_CONDITIONAL], [test "X$HDF5_TOOLS" = "Xyes"])
## ----------------------------------------------------------------------
## Build the Makefiles.

View File

@ -22,14 +22,21 @@
include $(top_srcdir)/config/commence.am
if BUILD_PARALLEL_CONDITIONAL
if BUILD_TESTS_PARALLEL_CONDITIONAL
TESTPARALLEL_DIR=testpar
else
TESTPARALLEL_DIR=
endif
if BUILD_TESTS_CONDITIONAL
TESTSERIAL_DIR=test
else
TESTSERIAL_DIR=
endif
# Subdirectories in build order, not including examples directory
## Only recurse into subdirectories if HDF5 is configured to use Fortran.
if BUILD_FORTRAN_CONDITIONAL
SUBDIRS=src test $(TESTPARALLEL_DIR)
SUBDIRS=src $(TESTSERIAL_DIR) $(TESTPARALLEL_DIR)
# Test with just the native connector, with a single pass-through connector
# and with a doubly-stacked pass-through.

View File

@ -31,11 +31,21 @@ endif
if BUILD_CXX_CONDITIONAL
CXX_DIR = c++
endif
if BUILD_TESTS_CONDITIONAL
TEST_DIR = test
else
TEST_DIR =
endif
if BUILD_TOOLS_CONDITIONAL
TOOLS_DIR = tools
else
TOOLS_DIR =
endif
## Don't recurse into any subdirectories if HDF5 is not configured to
## use the HL library
if BUILD_HDF5_HL_CONDITIONAL
SUBDIRS=src test tools $(CXX_DIR) $(FORTRAN_DIR)
SUBDIRS=src $(TEST_DIR) $(TOOLS_DIR) $(CXX_DIR) $(FORTRAN_DIR)
# Test with just the native connector, with a single pass-through connector
# and with a doubly-stacked pass-through.

View File

@ -18,7 +18,13 @@
include $(top_srcdir)/config/commence.am
SUBDIRS=src test
if BUILD_TESTS_CONDITIONAL
TESTSERIAL_DIR =test
else
TESTSERIAL_DIR=
endif
SUBDIRS=src $(TESTSERIAL_DIR)
DIST_SUBDIRS=src test examples
# Install examples

View File

@ -23,7 +23,13 @@
include $(top_srcdir)/config/commence.am
SUBDIRS=src test
if BUILD_TESTS_CONDITIONAL
TESTSERIAL_DIR =test
else
TESTSERIAL_DIR=
endif
SUBDIRS=src $(TESTSERIAL_DIR)
DIST_SUBDIRS=src test examples
# Install examples

View File

@ -23,13 +23,21 @@
include $(top_srcdir)/config/commence.am
if BUILD_TESTS_CONDITIONAL
TESTSERIAL_DIR =test
TESTEXAMPLES_DIR =examples
else
TESTSERIAL_DIR=
TESTEXAMPLES_DIR=
endif
## Only recurse into subdirectories if the Java (JNI) interface is enabled.
if BUILD_JAVA_CONDITIONAL
# Mark this directory as part of the JNI API
JAVA_API=yes
SUBDIRS=src test examples
SUBDIRS=src $(TESTSERIAL_DIR) $(TESTEXAMPLES_DIR)
# Test with just the native connector, with a single pass-through connector
# and with a doubly-stacked pass-through.

View File

@ -19,10 +19,16 @@
include $(top_srcdir)/config/commence.am
if BUILD_TESTS_CONDITIONAL
TESTSERIAL_DIR =test
else
TESTSERIAL_DIR=
endif
CONFIG=ordered
# All subdirectories
SUBDIRS=lib src test
SUBDIRS=lib src $(TESTSERIAL_DIR)
# Test with just the native connector, with a single pass-through connector
# and with a doubly-stacked pass-through.