diff options
author | Tomek Mrugalski <tomasz@isc.org> | 2019-11-19 20:57:18 +0100 |
---|---|---|
committer | Tomek Mrugalski <tomasz@isc.org> | 2019-12-06 14:52:02 +0100 |
commit | 1ea6b15903826d3b2f6e0b1a1bfcccff0f35897b (patch) | |
tree | ba0bea00151c099635d3fb3a5cd943913fd406c2 /m4macros/ax_gtest.m4 | |
parent | [#206] Moved gtest handling routines to a separate m4 file (diff) | |
download | kea-1ea6b15903826d3b2f6e0b1a1bfcccff0f35897b.tar.xz kea-1ea6b15903826d3b2f6e0b1a1bfcccff0f35897b.zip |
[#206] gtest version detection fixed
Diffstat (limited to 'm4macros/ax_gtest.m4')
-rw-r--r-- | m4macros/ax_gtest.m4 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/m4macros/ax_gtest.m4 b/m4macros/ax_gtest.m4 index 61257d0779..3c4bcd0eaf 100644 --- a/m4macros/ax_gtest.m4 +++ b/m4macros/ax_gtest.m4 @@ -91,10 +91,20 @@ if test "x$enable_gtest" = "xyes" ; then [AC_MSG_ERROR([no gtest source at $GTEST_SOURCE])]) fi have_gtest_source=yes + GTEST_LDADD="\$(top_builddir)/ext/gtest/libgtest.a" DISTCHECK_GTEST_CONFIGURE_FLAG="--with-gtest-source=$GTEST_SOURCE" GTEST_INCLUDES="-I$GTEST_SOURCE -I$GTEST_SOURCE/include" GTEST_VERSION="`basename $GTEST_SOURCE`" + +# Versions starting from 1.8.0 are put in the googletest directory. If the basename +# returns googletest string, we need to cut it off and try baseline again. + if test "$GTEST_VERSION" == "googletest"; then + GTEST_VERSION=${GTEST_SOURCE%"/googletest"} + GTEST_VERSION=`basename $GTEST_VERSION` + fi + GTEST_VERSION="${GTEST_VERSION#googletest-release-}" + GTEST_VERSION="${GTEST_VERSION#gtest-}" fi if test "$gtest_path" != "no" ; then |