aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorDylan Van Assche <me@dylanvanassche.be>2022-07-25 09:18:29 +0200
committerDylan Van Assche <me@dylanvanassche.be>2022-07-25 11:01:51 +0200
commitba96ccc61587b7b6c31b94826ee7a3c44d795364 (patch)
tree6924ba6a4cd89c8500a9e7826074df5b23616b65 /data
parent041f53af8b138fda6242ad1381fd3cd1c2ff6c81 (diff)
build: make tests optional
Add a meson option -Dtests and --without-tests automake option to disable the compilation of all available testcases. This is useful for compiling projects with Flatpak such as GNOME Control Center which disables all possible integrations since they only need the DBus part of ModemManager. Contributes to https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1392
Diffstat (limited to 'data')
-rw-r--r--data/Makefile.am9
-rw-r--r--data/meson.build4
2 files changed, 11 insertions, 2 deletions
diff --git a/data/Makefile.am b/data/Makefile.am
index 12330e27..640d2b24 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,5 +1,12 @@
-SUBDIRS = . dispatcher-connection dispatcher-fcc-unlock tests
+SUBDIRS = \
+ . \
+ dispatcher-connection \
+ dispatcher-fcc-unlock
+
+if WITH_TESTS
+SUBDIRS += tests
+endif
edit = @sed \
-e 's|@sbindir[@]|$(sbindir)|g' \
diff --git a/data/meson.build b/data/meson.build
index d2a36b7e..7063d00e 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -1,7 +1,9 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2021 IƱigo Martinez <inigomartinez@gmail.com>
-subdir('tests')
+if enable_tests
+ subdir('tests')
+endif
service_conf = {
'sbindir': mm_prefix / mm_sbindir,