aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-02-06 11:51:54 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-04-22 15:05:25 +0000
commitc7248cf76398f573b560ba376061aa1bc42a62cb (patch)
tree38046542ad5af5ded5e5e26f06c19b2080f8bb05
parentdoc + meson.build: update information about foot.ini, small cleanup (diff)
meson: add -Dtests=false|true option
When set to false, no test binaries are neither built, nor executed (with “ninja test”). Closes #919
-rw-r--r--CHANGELOG.md4
-rw-r--r--INSTALL.md17
-rw-r--r--meson.build6
-rw-r--r--meson_options.txt2
4 files changed, 20 insertions, 9 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d7c1618d..69158580 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -66,6 +66,10 @@
foot only supports level 1 and 2 (and not level 0), this sequence
does not disable _modifyOtherKeys_ completely, but simply reverts it
back to level 1 (the default).
+* `-Dtests=false|true` meson command line option. When disabled, test
+ binaries will neither be built, nor will `ninja test` attempt to
+ execute them. Enabled by default
+ (https://codeberg.org/dnkl/foot/issues/919).
### Changed
diff --git a/INSTALL.md b/INSTALL.md
index 2452fafc..1ce5260e 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -140,14 +140,15 @@ mkdir -p bld/release && cd bld/release
Available compile-time options:
-| Option | Type | Default | Description | Extra dependencies |
-|--------------------------------------|---------|-----------------------|----------------------------------|--------------------|
-| `-Ddocs` | feature | `auto` | Builds and install documentation | scdoc |
-| `-Dime` | bool | `true` | Enables IME support | None |
-| `-Dgrapheme-clustering` | feature | `auto` | Enables grapheme clustering | libutf8proc |
-| `-Dterminfo` | feature | `enabled` | Build and install terminfo files | tic (ncurses) |
-| `-Ddefault-terminfo` | string | `foot` | Default value of `TERM` | none |
-| `-Dcustom-terminfo-install-location` | string | `${datadir}/terminfo` | Value to set `TERMINFO` to | None |
+| Option | Type | Default | Description | Extra dependencies |
+|--------------------------------------|---------|-----------------------|------------------------------------------------|--------------------|
+| `-Ddocs` | feature | `auto` | Builds and install documentation | scdoc |
+| `-Dtests` | bool | `true` | Build tests (adds a `ninja test` build target) | none |
+| `-Dime` | bool | `true` | Enables IME support | None |
+| `-Dgrapheme-clustering` | feature | `auto` | Enables grapheme clustering | libutf8proc |
+| `-Dterminfo` | feature | `enabled` | Build and install terminfo files | tic (ncurses) |
+| `-Ddefault-terminfo` | string | `foot` | Default value of `TERM` | none |
+| `-Dcustom-terminfo-install-location` | string | `${datadir}/terminfo` | Value to set `TERMINFO` to | None |
Documentation includes the man pages, readme, changelog and license
files.
diff --git a/meson.build b/meson.build
index 7ebdb672..fb67857b 100644
--- a/meson.build
+++ b/meson.build
@@ -303,7 +303,10 @@ endif
subdir('completions')
subdir('icons')
-subdir('tests')
+
+if (get_option('tests'))
+ subdir('tests')
+endif
summary(
{
@@ -315,6 +318,7 @@ summary(
'Terminfo install location': terminfo_install_location,
'Default TERM': get_option('default-terminfo'),
'Set TERMINFO': get_option('custom-terminfo-install-location') != '',
+ 'Build tests': get_option('tests'),
},
bool_yn: true
)
diff --git a/meson_options.txt b/meson_options.txt
index ccc7d5a1..255ca0ae 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -10,6 +10,8 @@ option('ime', type: 'boolean', value: true,
option('grapheme-clustering', type: 'feature',
description: 'Enables grapheme clustering using libutf8proc. Requires fcft with harfbuzz support to be useful.')
+option('tests', type: 'boolean', value: true, description: 'Build tests')
+
option('terminfo', type: 'feature', value: 'enabled', description: 'Build and install foot\'s terminfo files.')
option('default-terminfo', type: 'string', value: 'foot',
description: 'Default value of the "term" option in foot.ini.')