Skip to content

Commit

Permalink
Meson: Add an option to skip tests for non-subproject builds
Browse files Browse the repository at this point in the history
  • Loading branch information
jenatali committed Dec 28, 2020
1 parent d64caa7 commit 1ff6b55
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

option('build-test',
type : 'boolean',
value : true,
description : 'Build the test')

0 comments on commit 1ff6b55

Please sign in to comment.