diff options
author | Patrick Venture <venture@google.com> | 2018-06-27 10:19:32 -0700 |
---|---|---|
committer | Patrick Venture <venture@google.com> | 2018-06-27 10:20:49 -0700 |
commit | 9f51481f3e1d48e5479624fb40f2df279152d453 (patch) | |
tree | 18d589a653fd78df411052fe889e23e50ea5482b | |
parent | a4353bcfd0d1274f9454c9731d26ff49d3d40cb7 (diff) | |
download | phosphor-hwmon-9f51481f3e1d48e5479624fb40f2df279152d453.tar.gz phosphor-hwmon-9f51481f3e1d48e5479624fb40f2df279152d453.zip |
update configure and test/Makefile.am
Update configure.ac and test/Makefile.am to properly handle
newer googletest, per gerrit/11203.
Change-Id: I13563216784389d0a32f802daf23d75658e0288e
Signed-off-by: Patrick Venture <venture@google.com>
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | test/Makefile.am | 9 |
2 files changed, 6 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index 086dee0..cc8c655 100644 --- a/configure.ac +++ b/configure.ac @@ -16,6 +16,7 @@ AC_PROG_MAKE_SET PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus], [], [AC_MSG_ERROR(["sdbusplus required and not found."])]) PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [phosphor-dbus-interfaces], [], [AC_MSG_ERROR(["phosphor-dbus-interfaces required and not found."])]) PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging], [], [AC_MSG_ERROR(["phosphor-logging required and not found."])]) +AX_PTHREAD([], [AC_MSG_ERROR(["pthread required and not found"])]) # Checks for typedefs, structures, and compiler characteristics. AX_CXX_COMPILE_STDCXX_14([noext]) @@ -31,7 +32,7 @@ LT_INIT # Check/set gtest specific functions. 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])]) -AX_PTHREAD([GTEST_CFLAGS+=" -DGTEST_HAS_PTHREAD=1 "],[GTEST_CFLAGS+=" -DGTEST_HAS_PTHREAD=0 "]) +PKG_CHECK_MODULES([GTEST_MAIN], [gtest_main], [], [AC_MSG_NOTICE([gtest_main not found, tests will not build])]) # Add --enable-oe-sdk flag to configure script AC_ARG_ENABLE([oe-sdk], diff --git a/test/Makefile.am b/test/Makefile.am index 1b07171..b9a3c49 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,12 +1,11 @@ AM_CPPFLAGS = -I$(top_srcdir)/ $(GTEST_CFLAGS) $(GMOCK_CFLAGS) -AM_CXXFLAGS = $(PTHREAD_CFLAGS) \ - $(GTEST_CFLAGS) \ - $(GMOCK_CFLAGS) \ +AM_CXXFLAGS = \ + $(GTEST_MAIN_CFLAGS) $(SDBUSPLUS_CFLAGS) \ $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) -AM_LDFLAGS = $(GTEST_LIBS) \ - $(PTHREAD_LIBS) \ +AM_LDFLAGS = \ $(GMOCK_LIBS) \ + $(GTEST_MAIN_LIBS) \ $(OESDK_TESTCASE_FLAGS) \ $(SDBUSPLUS_LIBS) \ $(PHOSPHOR_DBUS_INTERFACES_LIBS) |