Meson: Add an option to skip tests for non-subproject builds

This commit is contained in:
Jesse Natalie 2020-12-28 11:54:18 -08:00
parent d64caa7c84
commit 1ff6b55ac5
2 changed files with 8 additions and 1 deletions

View File

@ -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

7
meson_options.txt Normal file
View File

@ -0,0 +1,7 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
option('build-test',
type : 'boolean',
value : true,
description : 'Build the test')