From 627f1a00885052a8eb86e52aaf00bc66b5ebacd2 Mon Sep 17 00:00:00 2001 From: Jake Farrell Date: Wed, 14 Sep 2011 03:43:49 +0000 Subject: [PATCH] Thrift-1345: Allow building without test cases Client: build env Patch: Vitali Lovich Adds --without-tests to configure to omit processing/building the test directories. git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1170426 13f79535-47bb-0310-9956-ffa450edef68 --- Makefile.am | 6 +++++- configure.ac | 6 ++++++ lib/cpp/Makefile.am | 6 +++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index abe87dad..b5f36ef0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,7 +19,11 @@ ACLOCAL_AMFLAGS = -I ./aclocal -SUBDIRS = compiler/cpp lib test +SUBDIRS = compiler/cpp lib + +if WITH_TESTS +SUBDIRS += test +endif dist-hook: find $(distdir) -type f \( -iname ".deps" -or -iname ".libs" -or -iname ".gitignore" \ diff --git a/configure.ac b/configure.ac index b7c3bc86..f4c408a5 100644 --- a/configure.ac +++ b/configure.ac @@ -277,6 +277,12 @@ if test "$with_go" = "yes"; then fi AM_CONDITIONAL(WITH_GO, [test "$have_go" = "yes"]) +have_tests=yes +if test "$with_tests" = "no"; then + have_tests="no" +fi +AM_CONDITIONAL(WITH_TESTS, [test "$have_tests" = "yes"]) + AC_C_CONST AC_C_INLINE AC_C_VOLATILE diff --git a/lib/cpp/Makefile.am b/lib/cpp/Makefile.am index 35bc8a89..d5bc4899 100644 --- a/lib/cpp/Makefile.am +++ b/lib/cpp/Makefile.am @@ -17,7 +17,11 @@ # under the License. # -SUBDIRS = . test +SUBDIRS = . + +if WITH_TESTS +SUBDIRS += test +endif pkgconfigdir = $(libdir)/pkgconfig -- 2.17.1