Commit 31830397 authored by Jeremy C. Reed's avatar Jeremy C. Reed

[master] for trac #1247: distcheck should enable gtest when possible

If --with-gtest defined on ./configure line, then do same for distcheck
target.
parent c96f735c
...@@ -2,12 +2,16 @@ SUBDIRS = doc src tests ...@@ -2,12 +2,16 @@ SUBDIRS = doc src tests
USE_LCOV=@USE_LCOV@ USE_LCOV=@USE_LCOV@
LCOV=@LCOV@ LCOV=@LCOV@
GENHTML=@GENHTML@ GENHTML=@GENHTML@
DISTCHECK_GTEST_CONFIGURE_FLAG=@DISTCHECK_GTEST_CONFIGURE_FLAG@
DISTCLEANFILES = config.report DISTCLEANFILES = config.report
# When running distcheck target, do not install the configurations # When running distcheck target, do not install the configurations
DISTCHECK_CONFIGURE_FLAGS = --disable-install-configurations DISTCHECK_CONFIGURE_FLAGS = --disable-install-configurations
# Use same --with-gtest flag if set
DISTCHECK_CONFIGURE_FLAGS += $(DISTCHECK_GTEST_CONFIGURE_FLAG)
clean-cpp-coverage: clean-cpp-coverage:
@if [ $(USE_LCOV) = yes ] ; then \ @if [ $(USE_LCOV) = yes ] ; then \
$(LCOV) --directory . --zerocounters; \ $(LCOV) --directory . --zerocounters; \
......
...@@ -650,6 +650,7 @@ fi ...@@ -650,6 +650,7 @@ fi
# #
if test "$gtest_path" != "no" if test "$gtest_path" != "no"
then then
DISTCHECK_GTEST_CONFIGURE_FLAG="--with-gtest=\"$gtest_path\""
if test "$gtest_path" != "yes"; then if test "$gtest_path" != "yes"; then
GTEST_PATHS=$gtest_path GTEST_PATHS=$gtest_path
if test -x "${gtest_path}/bin/gtest-config" ; then if test -x "${gtest_path}/bin/gtest-config" ; then
...@@ -690,8 +691,10 @@ else ...@@ -690,8 +691,10 @@ else
GTEST_INCLUDES= GTEST_INCLUDES=
GTEST_LDFLAGS= GTEST_LDFLAGS=
GTEST_LDADD= GTEST_LDADD=
DISTCHECK_GTEST_CONFIGURE_FLAG=
fi fi
AM_CONDITIONAL(HAVE_GTEST, test $gtest_path != "no") AM_CONDITIONAL(HAVE_GTEST, test $gtest_path != "no")
AC_SUBST(DISTCHECK_GTEST_CONFIGURE_FLAG)
AC_SUBST(GTEST_INCLUDES) AC_SUBST(GTEST_INCLUDES)
AC_SUBST(GTEST_LDFLAGS) AC_SUBST(GTEST_LDFLAGS)
AC_SUBST(GTEST_LDADD) AC_SUBST(GTEST_LDADD)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment