diff options
author | Lei YU <mine260309@gmail.com> | 2018-09-10 10:34:56 +0800 |
---|---|---|
committer | Lei YU <mine260309@gmail.com> | 2018-09-12 10:44:55 +0800 |
commit | bd024395f6e34f4bc5eff4941991abc572e9707e (patch) | |
tree | 57d13ef1f218fd0f2dbc79d0415971ad06aafc43 /configure.ac | |
parent | 33752c75e8bdadf13d983e94667de72f64ba3537 (diff) | |
download | phosphor-time-manager-bd024395f6e34f4bc5eff4941991abc572e9707e.tar.gz phosphor-time-manager-bd024395f6e34f4bc5eff4941991abc572e9707e.zip |
Use correct gtest/gmock flags
The test Makefile.am was using -lgmock -lgmock_main directly, which
cause link issues on compiling test.
Fix this by using the flags specified by gtest package.
Tested: Verify the CI passes build.
Change-Id: Id51134d7e2696e18f7439f15f8d899edba51856e
Signed-off-by: Lei YU <mine260309@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index b95dc93..59cf5ce 100644 --- a/configure.ac +++ b/configure.ac @@ -22,11 +22,12 @@ PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus],,\ AC_MSG_ERROR(["Requires sdbusplus package."])) PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging],,\ AC_MSG_ERROR(["Requires phosphor-logging package."])) +AX_PTHREAD([], [AC_MSG_ERROR(["pthread required and not found"])]) -# gtest # Check/set gtest specific functions. -AX_PTHREAD([GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=1"],[GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=0"]) -AC_SUBST(GTEST_CPPFLAGS) +PKG_CHECK_MODULES([GTEST], [gtest], [], [AC_MSG_NOTICE([gtest not found, tests will not build])]) +PKG_CHECK_MODULES([GMOCK], [gmock], [], [AC_MSG_NOTICE([gmock not found, tests will not build])]) +PKG_CHECK_MODULES([GTEST_MAIN], [gtest_main], [], [AC_MSG_NOTICE([gtest_main not found, tests will not build])]) # Test cases require SDK so only build if we're told to (and SDK is available) AC_ARG_ENABLE([oe-sdk], |