Skip to content

Commit

Permalink
Probe Google test mock header.
Browse files Browse the repository at this point in the history
Signed-off-by: Erez Geva <[email protected]>
  • Loading branch information
erezgeva committed Oct 22, 2024
1 parent 4ebd80f commit b234aed
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ AS_UNSET([ptpm_skip_libsys])
AS_UNSET([HAVE_GTEST_HEADER])
AS_UNSET([GTEST_INC_FLAGS])
AS_UNSET([GTEST_LIB_FLAGS])
AS_UNSET([HAVE_GMOCK_HEADER])
AS_UNSET([HAVE_CRITERION_HEADER])
AS_UNSET([CRITERION_INC_FLAGS])
AS_UNSET([CRITERION_LIB_FLAGS])
Expand All @@ -361,6 +362,8 @@ AS_IF([PTPM_VAR_SET_TEST([HAVE_GTEST_HEADER]) &&\
['-lgtest -lpthread'])])],
[AS_UNSET([GTEST_LIB_FLAGS])],
["$GTEST_LIB_FLAGS"])])
AC_CHECK_HEADER([gmock/gmock.h],
[AS_VAR_SET([HAVE_GMOCK_HEADER], ['gmock/gmock.h'])])

AC_CHECK_HEADER([criterion/criterion.h],
[AS_VAR_SET([HAVE_CRITERION_HEADER], ['criterion/criterion.h'])])
Expand Down Expand Up @@ -388,6 +391,7 @@ AS_VAR_IF([ptpm_skip_libsys], ['no'],
AC_SUBST([HAVE_GTEST_HEADER])
AC_SUBST([GTEST_INC_FLAGS])
AC_SUBST([GTEST_LIB_FLAGS])
AC_SUBST([HAVE_GMOCK_HEADER])
AC_SUBST([HAVE_CRITERION_HEADER])
AC_SUBST([CRITERION_INC_FLAGS])
AC_SUBST([CRITERION_LIB_FLAGS])
Expand Down
1 change: 1 addition & 0 deletions defs.mk.in
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ DATE:=@DATE@
HAVE_GTEST_HEADER:=@HAVE_GTEST_HEADER@
GTEST_INC_FLAGS:=@GTEST_INC_FLAGS@
GTEST_LIB_FLAGS:=@GTEST_LIB_FLAGS@
HAVE_GMOCK_HEADER:=@HAVE_GMOCK_HEADER@
HAVE_CRITERION_HEADER:=@HAVE_CRITERION_HEADER@
CRITERION_INC_FLAGS:=@CRITERION_INC_FLAGS@
CRITERION_LIB_FLAGS:=@CRITERION_LIB_FLAGS@
Expand Down
5 changes: 3 additions & 2 deletions tools/ci_address.sh
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ config_report()
local list='build host TCL_MINVER PERL PY3_VER RUBY_VER PHP_VER
LUA_VERS LUA_VER USE_ENDIAN PERL5_VER
GO_MINVER DOTTOOL ASTYLE_MINVER HAVE_GTEST_HEADER HAVE_CRITERION_HEADER
CPPCHECK SWIG_MINVER DOXYGEN_MINVER
HAVE_GMOCK_HEADER CPPCHECK SWIG_MINVER DOXYGEN_MINVER
PACKAGE_VERSION CXX_VERSION CXX CC_VERSION CC CHRPATH PATCHELF
HAVE_SSL_HEADER HAVE_GCRYPT_HEADER HAVE_GNUTLS_HEADER HAVE_NETTLE_HEADER'
local langs='tcl perl5 python3 ruby php lua go'
Expand Down Expand Up @@ -436,6 +436,7 @@ config_report()
[[ -n "$HAVE_GNUTLS_HEADER" ]] && local -r gnutls='v' || local -r gnutls='x'
[[ -n "$HAVE_NETTLE_HEADER" ]] && local -r nettle='v' || local -r nettle='x'
[[ -n "$HAVE_GTEST_HEADER" ]] && local -r gtest='v' || local -r gtest='x'
[[ -n "$HAVE_GMOCK_HEADER" ]] && local -r gmock='v' || local -r gmock='x'
[[ -n "$HAVE_CRITERION_HEADER" ]] && local -r crtest='v' || local -r crtest='x'
[[ -n "$CPPCHECK" ]] && local -r cppcheck='v' || local -r cppcheck='x'
[[ -n "$SWIG_MINVER" ]] && local -r swig="$SWIG_MINVER" || local -r swig='x'
Expand All @@ -447,7 +448,7 @@ compilers $CXX $CXX_VERSION, $CC $CC_VERSION
rpath '$rpath'
ssl '$ssl' gcrypt '$gcrypt' gnutls '$gnutls' nettle '$nettle'
Doxygen '$doxy' dot '$dver' cppcheck '$cppcheck' astyle '$astyle'
Google test '$gtest' Criterion test '$crtest'
Google test '$gtest' Google test mock '$gmock' Criterion test '$crtest'
swig '$swig' Python '$python3' Ruby '$ruby' PHP '$php'
Perl '$perl5' go '$go' tcl '$tcl' Lua '$lua'
============================================================
Expand Down

0 comments on commit b234aed

Please sign in to comment.