From: Rodrigo Vivi Date: Tue, 5 Feb 2013 18:17:54 +0000 (-0200) Subject: Build: Add --disable-tests configure flag to avoid tests build X-Git-Tag: intel-gpu-tools-1.4~805 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7c170724003f42cd4ceea9f6c805292bbe2e81b2;p=platform%2Fupstream%2Fintel-gpu-tools.git Build: Add --disable-tests configure flag to avoid tests build Tests are still being built by default. However this request came from OSVs in order to allow them to include i-g-t in their distributions by default avoiding adding more and more dependencies since we are improving and adding more and more tests. v2: wait for Ben's spacing fixes and adjusted for new space rules. Signed-off-by: Rodrigo Vivi Acked-by: Paul Menzel Reviewed-by: Takashi Iwai Signed-off-by: Daniel Vetter --- diff --git a/Makefile.am b/Makefile.am index 5ea0fd8..0dd615b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,12 +21,16 @@ ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -SUBDIRS = lib man tools scripts tests benchmarks demos +SUBDIRS = lib man tools scripts benchmarks demos if BUILD_SHADER_DEBUGGER SUBDIRS += debugger endif +if BUILD_TESTS +SUBDIRS += tests +endif + test: ${MAKE} -C tests test diff --git a/configure.ac b/configure.ac index 1c56fa4..e66876c 100644 --- a/configure.ac +++ b/configure.ac @@ -122,6 +122,16 @@ AM_CONDITIONAL(BUILD_SHADER_DEBUGGER, [test "x$BUILD_SHADER_DEBUGGER" != xno]) XORG_TESTSET_CFLAG([THREAD_CFLAGS], [-pthread], [-mt]) AC_SUBST([THREAD_CFLAGS]) +AC_ARG_ENABLE(tests, + AS_HELP_STRING([--disable-tests], + [Disable tests build (default: enabled)]), + [BUILD_TESTS=$enableval], [BUILD_TESTS="yes"]) +if test "x$BUILD_TESTS" = xyes; then + AC_DEFINE(BUILD_TESTS, 1, [Build tests]) + AC_CONFIG_FILES([tests/Makefile]) +fi +AM_CONDITIONAL(BUILD_TESTS, [test "x$BUILD_TESTS" = xyes]) + AC_CONFIG_FILES([ Makefile benchmarks/Makefile @@ -129,7 +139,6 @@ AC_CONFIG_FILES([ lib/Makefile man/Makefile scripts/Makefile - tests/Makefile tools/Makefile debugger/Makefile debugger/system_routine/Makefile