From c47e9796746f96f1f8f08fb95c98f5bf632705f4 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Mon, 11 Apr 2016 13:34:36 +0200 Subject: Add configure option to enable building unit tests Same template should be used for other libs... Change-Id: Icc771cb6b243d215f30fb51c0dbc028e497a74c6 Signed-off-by: Damjan Marion --- vppinfra/Makefile.am | 6 +++++- vppinfra/configure.ac | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'vppinfra') diff --git a/vppinfra/Makefile.am b/vppinfra/Makefile.am index 3a400163..adcd32cc 100644 --- a/vppinfra/Makefile.am +++ b/vppinfra/Makefile.am @@ -20,7 +20,10 @@ endif lib_LIBRARIES = -TESTS = test_bihash_template \ +TESTS = + +if ENABLE_TESTS +TESTS += test_bihash_template \ test_elog \ test_elf \ test_fifo \ @@ -44,6 +47,7 @@ TESTS = test_bihash_template \ test_timing_wheel \ test_vec \ test_zvec +endif noinst_PROGRAMS = $(TESTS) check_PROGRAMS = $(TESTS) diff --git a/vppinfra/configure.ac b/vppinfra/configure.ac index d0b3a0c0..712186af 100644 --- a/vppinfra/configure.ac +++ b/vppinfra/configure.ac @@ -31,6 +31,13 @@ AC_ARG_WITH(ldflags, ###################################################################### +AC_ARG_ENABLE(tests, + AC_HELP_STRING([--enable-tests],[Enable unit tests]), + [enable_tests=1], + [enable_tests=0]) + +AM_CONDITIONAL(ENABLE_TESTS, test "$enable_tests" = "1") + AC_ARG_WITH(unix, AC_HELP_STRING([--with-unix],[Compile unix version of clib]), [], -- cgit 1.2.3-korg