diff options
author | Piotrek Zadroga <piotrek@isc.org> | 2023-10-04 16:55:31 +0200 |
---|---|---|
committer | Piotrek Zadroga <piotrek@isc.org> | 2023-10-04 19:36:20 +0200 |
commit | dd1a2d5b88b495bc669efe28c680a2d24daacc04 (patch) | |
tree | 35467c2aee21746a1f6e7db79d5027f08653722e /m4macros | |
parent | [#3065] remove unnecessary warnings (diff) | |
download | kea-dd1a2d5b88b495bc669efe28c680a2d24daacc04.tar.xz kea-dd1a2d5b88b495bc669efe28c680a2d24daacc04.zip |
[#3065] addressing review comments
Diffstat (limited to 'm4macros')
-rw-r--r-- | m4macros/ax_gtest.m4 | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/m4macros/ax_gtest.m4 b/m4macros/ax_gtest.m4 index c1aea5270d..41bbe09e3f 100644 --- a/m4macros/ax_gtest.m4 +++ b/m4macros/ax_gtest.m4 @@ -74,24 +74,24 @@ if test "x$enable_gtest" = "xyes" ; then GTEST_SOURCE= for d in /usr/src/googletest /usr/src/gtest /usr/local /usr/pkg /opt /opt/local ; do cmakelists="$d/CMakeLists.txt" - if test ! -d "$d"/src -a -d "$d"/googletest; then - d=$d/googletest + if test ! -d "$d/src" -a -d "$d/googletest"; then + d="$d/googletest" fi - if test -f $d/src/gtest-all.cc -a -f $d/src/gtest_main.cc; then - GTEST_SOURCE=$d + if test -f "$d/src/gtest-all.cc" -a -f "$d/src/gtest_main.cc"; then + GTEST_SOURCE="$d" AC_MSG_RESULT([$GTEST_SOURCE]) break fi done - if test -z $GTEST_SOURCE ; then + if test -z "$GTEST_SOURCE" ; then AC_MSG_ERROR([no gtest sources found]) fi else cmakelists="$GTEST_SOURCE/CMakeLists.txt" - if test ! -d $GTEST_SOURCE/src -a -d $GTEST_SOURCE/googletest; then - GTEST_SOURCE=$GTEST_SOURCE/googletest + if test ! -d "$GTEST_SOURCE/src" -a -d "$GTEST_SOURCE/googletest"; then + GTEST_SOURCE="$GTEST_SOURCE/googletest" fi - if test -f $GTEST_SOURCE/src/gtest-all.cc -a -f $GTEST_SOURCE/src/gtest_main.cc; then + if test -f "$GTEST_SOURCE/src/gtest-all.cc" -a -f "$GTEST_SOURCE/src/gtest_main.cc"; then AC_MSG_RESULT([$GTEST_SOURCE]) else AC_MSG_ERROR([no gtest source at $GTEST_SOURCE]) @@ -123,12 +123,12 @@ if test "x$enable_gtest" = "xyes" ; then # If the GTEST_VERSION is still not correct semver, we need to determine googletest version in other way. # Let's try to extract it from CMake build script used by Google Test starting from version 1.8.0. if test -f "$cmakelists" ; then - gtest_version_candidate=$(< "$cmakelists" grep -F 'set(GOOGLETEST_VERSION' | grep -Eo '[[0-9]+\.[0-9]+\.[0-9]+]') + gtest_version_candidate=$(grep -F 'set(GOOGLETEST_VERSION' "$cmakelists" | grep -Eo '[[0-9]+\.[0-9]+\.[0-9]+]') if test -n "$gtest_version_candidate"; then - GTEST_VERSION=$gtest_version_candidate + GTEST_VERSION="$gtest_version_candidate" fi fi - if test $GTEST_VERSION = "unknown" ; then + if test "$GTEST_VERSION" = "unknown" ; then # Try to get googletest version from debian/ubuntu package AC_PATH_PROG(DPKG, dpkg) AC_PATH_PROG(DPKGQUERY, dpkg-query) @@ -141,7 +141,7 @@ if test "x$enable_gtest" = "xyes" ; then fi fi else - GTEST_VERSION=$gtest_version_candidate + GTEST_VERSION="$gtest_version_candidate" fi fi |