From 1ff6b55ac5fad7845714baabbcaf62ec72fc96c8 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Mon, 28 Dec 2020 11:54:18 -0800 Subject: [PATCH] Meson: Add an option to skip tests for non-subproject builds --- meson.build | 2 +- meson_options.txt | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 meson_options.txt diff --git a/meson.build b/meson.build index 6db2f68..6c368bd 100644 --- a/meson.build +++ b/meson.build @@ -18,7 +18,7 @@ dep_dxheaders = declare_dependency( link_with : guids_lib, include_directories : inc_dirs) -if not meson.is_subproject() +if not meson.is_subproject() and get_option('build-test') subdir('test') endif diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 0000000..a6ed5d3 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,7 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + +option('build-test', + type : 'boolean', + value : true, + description : 'Build the test')