[Spice-commits] 2 commits - configure.ac Makefile.am meson_options.txt server/Makefile.am server/meson.build
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Mar 26 09:40:11 UTC 2020
Makefile.am | 2 ++
configure.ac | 7 +++++++
meson_options.txt | 5 +++++
server/Makefile.am | 4 ++++
server/meson.build | 9 +++++----
5 files changed, 23 insertions(+), 4 deletions(-)
New commits:
commit 38c7964d5365ddc6e08b8ea7d0f819f261684946
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Wed Mar 18 01:54:41 2020 +0000
build: Make building the test binaries optional under Autoconf
Following similar change for Meson.
Allow to save some time packaging and some dependencies.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/Makefile.am b/Makefile.am
index 448332b2..d8d1a1ca 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,8 +3,10 @@ ACLOCAL_AMFLAGS = -I m4
SUBDIRS = subprojects/spice-common server docs tools
+if ENABLE_TESTS
check-valgrind:
$(MAKE) -C server check-valgrind
+endif
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = spice-server.pc
diff --git a/configure.ac b/configure.ac
index 18d6ddfd..c8bdfb0e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -135,6 +135,13 @@ if test "x$have_gstreamer_0_10" = "xyes" || test "x$have_gstreamer_1_0" = "xyes"
AC_SUBST(ORC_LIBS)
fi
+AC_ARG_ENABLE([tests],
+ AS_HELP_STRING([--enable-tests],
+ [Enable tests @<:@default=yes@:>@]),
+ [],
+ enable_tests="yes")
+AM_CONDITIONAL(ENABLE_TESTS, test "x$enable_tests" = "xyes")
+
dnl Check for the presence of Valgrind and do the plumbing to allow
dnl the running of "make check-valgrind".
AX_VALGRIND_DFLT(memcheck, on)
diff --git a/server/Makefile.am b/server/Makefile.am
index 166ea894..3434e393 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -1,8 +1,12 @@
NULL =
+SUBDIRS =
+
+if ENABLE_TESTS
SUBDIRS = . tests
check-valgrind:
$(MAKE) -C tests check-valgrind
+endif
AM_CPPFLAGS = \
-DSPICE_SERVER_INTERNAL \
commit 7a2b915551f51d9266bd3e75a8362212f92b09df
Author: James Le Cuirot <chewi at gentoo.org>
Date: Mon Mar 16 22:07:08 2020 +0000
build: Make building the test binaries optional under Meson
Signed-off-by: James Le Cuirot <chewi at gentoo.org>
Acked-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/meson_options.txt b/meson_options.txt
index 36d39e01..034e1e93 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -46,3 +46,8 @@ option('instrumentation',
value : 'no',
choices : ['recorder', 'agent', 'no'],
description: 'Enable instrumentation')
+
+option('tests',
+ type : 'boolean',
+ value : true,
+ description : 'Build the test binaries')
diff --git a/server/meson.build b/server/meson.build
index b2eb410c..fb01bf89 100644
--- a/server/meson.build
+++ b/server/meson.build
@@ -184,7 +184,8 @@ spice_server_libs = both_libraries('spice-server', spice_server_sources,
dependencies : spice_server_deps,
gnu_symbol_visibility : 'hidden')
-spice_server_shared_lib = spice_server_libs.get_shared_lib()
-spice_server_static_lib = spice_server_libs.get_static_lib()
-
-subdir('tests')
+if get_option('tests')
+ spice_server_shared_lib = spice_server_libs.get_shared_lib()
+ spice_server_static_lib = spice_server_libs.get_static_lib()
+ subdir('tests')
+endif
More information about the Spice-commits
mailing list