This makes LTO builds compile, and also reduces the build time.
---
 Makefile.am  | 2 ++
 configure.ac | 8 ++++++++
 2 files changed, 10 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index d1644ac..08a18eb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1073,6 +1073,7 @@ libzunitcmain_la_LIBADD = \
 # tests subdirectory
 #
 
+if ENABLE_TESTS
 TESTS = $(internal_tests) $(shared_tests) $(module_tests) $(weston_tests) 
$(ivi_tests)
 
 internal_tests =                               \
@@ -1371,6 +1372,7 @@ surface_screenshot_la_LIBADD = $(COMPOSITOR_LIBS) 
libshared.la
 surface_screenshot_la_LDFLAGS = $(test_module_ldflags)
 surface_screenshot_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS)
 surface_screenshot_la_SOURCES = tests/surface-screenshot.c
+endif # ENABLE_TESTS
 
 
 #
diff --git a/configure.ac b/configure.ac
index 9e8115a..17ed666 100644
--- a/configure.ac
+++ b/configure.ac
@@ -516,6 +516,12 @@ AS_IF([test "x$have_systemd_login_209" = "xyes"],
       [AC_DEFINE([HAVE_SYSTEMD_LOGIN_209], [1], [Have systemd-login >= 209])])
 
 
+AC_ARG_ENABLE(tests,
+              AS_HELP_STRING([--disable-tests],
+                             [do not build tests]))
+AM_CONDITIONAL([ENABLE_TESTS],
+               [test x$enable_tests != xno])
+
 # Note that other features might want libxml2, or this feature might use
 # alternative xml libraries at some point. Therefore the feature and
 # pre-requisite concepts are split.
@@ -677,6 +683,8 @@ AC_MSG_RESULT([
        FBDEV Compositor                ${enable_fbdev_compositor}
        RDP Compositor                  ${enable_rdp_compositor}
        Screen Sharing                  ${enable_screen_sharing}
+
+       Enable tests                    ${enable_tests}
        JUnit XML output                ${enable_junit_xml}
 
        Raspberry Pi BCM headers        ${have_bcm_host}
-- 
2.7.4

_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to