diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-01-07 20:54:34 +0000 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-01-07 15:59:43 -0500 |
commit | 35aba2347fd0ffbbaf704d4cc067304881348182 (patch) | |
tree | 37e8730324d01e502779efbbbb684016c7e4dd74 /configure.ac | |
parent | 6826840cd4c23c53b418312431b8ac577702a496 (diff) | |
download | phosphor-inventory-manager-35aba2347fd0ffbbaf704d4cc067304881348182.tar.gz phosphor-inventory-manager-35aba2347fd0ffbbaf704d4cc067304881348182.zip |
build: Don't build tests unless asked
Introduce --enable-tests so that packagers don't need gtest installed
to produce a package.
Change-Id: Ic17f46f2535d0426d05f05d4ff32711d0a2847d1
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 95020a3..34a70e5 100644 --- a/configure.ac +++ b/configure.ac @@ -35,10 +35,17 @@ AC_CHECK_HEADER(sdbusplus/server.hpp, ,[AC_MSG_ERROR([Could not find sdbusplus/s # Checks for library functions. LT_INIT # Removes 'unrecognized options: --with-libtool-sysroot' + +# Make it possible for users to choose if they want test support +# explicitly or not at all +AC_ARG_ENABLE([tests], [Whether we should build test cases]) + # Check/set gtest specific functions. -PKG_CHECK_MODULES([GMOCK], [gtest_main],,) -PKG_CHECK_MODULES([GTEST], [gmock],,) -AX_PTHREAD +AS_IF([test "x$enable_tests" != "xno"], [ + PKG_CHECK_MODULES([GMOCK], [gtest_main],,) + PKG_CHECK_MODULES([GTEST], [gmock],,) + AX_PTHREAD +]) AC_ARG_ENABLE([oe-sdk], AS_HELP_STRING([--enable-oe-sdk], [Link testcases absolutely against OE SDK so they can be ran within it.]) |