From 6851e178161b72dcc19438fc2bfa2ab58eb591f1 Mon Sep 17 00:00:00 2001 From: stefan11111 Date: Tue, 1 Jul 2025 20:44:27 +0300 Subject: [PATCH] meson.build: meson_options.txt: add build option to disable building tests These tests take a long time to build and link, especially with lto. Signed-off-by: stefan11111 --- meson.build | 3 ++- meson_options.txt | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 433bfaf8a..84a631f39 100644 --- a/meson.build +++ b/meson.build @@ -777,7 +777,8 @@ endif subdir('hw') -if host_machine.system() != 'windows' +build_tests = get_option('tests') and host_machine.system() != 'windows' +if build_tests subdir('test') endif diff --git a/meson_options.txt b/meson_options.txt index ef49ffff8..4b30777ff 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -110,6 +110,8 @@ option('sha1', type: 'combo', choices: ['libc', 'CommonCrypto', 'CryptoAPI', 'li description: 'SHA1 implementation') option('xf86-input-inputtest', type: 'boolean', value: true, description: 'Test input driver support on Xorg') +option('tests', type: 'boolean', value: true, + description: 'Build tests for the X server on platforms that support it') option('dri1', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Build DRI1 extension (default: auto)') option('dri2', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Build DRI2 extension (default: auto)')