From 143e2dd5fecbac3e260ec0bddc2f4df2bfe3817f Mon Sep 17 00:00:00 2001 From: Colin Patrick McCabe Date: Wed, 13 Jul 2011 16:11:43 -0700 Subject: [PATCH] Don't build build tests unless requested Build tests (that check if there are unresolved symbols in libraries) can slow down the build a lot. We should only enable them when developers need them. Signed-off-by: Colin McCabe --- configure.ac | 2 ++ src/Makefile.am | 2 ++ 2 files changed, 4 insertions(+) diff --git a/configure.ac b/configure.ac index e748d0a520223..6a9c458bfd693 100644 --- a/configure.ac +++ b/configure.ac @@ -341,6 +341,8 @@ AS_IF([test "x$with_gtk2" != "xno"], ])]) AM_CONDITIONAL(WITH_GTK2, [test "x$have_gtk2" != "xno"]) +AM_CONDITIONAL(WITH_BUILD_TESTS, test "$WITH_BUILD_TESTS" = "1") + AM_PATH_PYTHON([2.4], [], [AC_MSG_FAILURE([Failed to find Python 2.4 or newer])]) diff --git a/src/Makefile.am b/src/Makefile.am index 010f54c7b005e..06ae79f477d16 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -176,6 +176,7 @@ testsnaps_SOURCES = test/osd/TestSnaps.cc test/osd/TestOpStat.cc test/osd/Object testsnaps_LDADD = librados.la $(LIBGLOBAL_LDA) bin_DEBUGPROGRAMS += testsnaps +if WITH_BUILD_TESTS test_libcommon_build_SOURCES = test/test_libcommon_build.cc $(libcommon_files) test_libcommon_build_LDADD = -lpthread -lm $(CRYPTO_LIBS) $(EXTRALIBS) bin_DEBUGPROGRAMS += test_libcommon_build @@ -196,6 +197,7 @@ test_libceph_build_SOURCES = test/test_libcommon_build.cc $(libcommon_files) \ test_libceph_build_LDADD = -lexpat -lpthread -lm $(CRYPTO_LIBS) $(EXTRALIBS) test_libceph_build_CXXFLAGS = $(AM_CXXFLAGS) bin_DEBUGPROGRAMS += test_libceph_build +endif if WITH_HADOOPCLIENT test_libhadoopcephfs_build_SOURCES = test/test_libcommon_build.cc \ -- 2.39.5