Skip to content

Commit a6fb479

Browse files
committed
update meson
1 parent 2a6cb95 commit a6fb479

File tree

3 files changed

+16
-11
lines changed

3 files changed

+16
-11
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ script:
3737
- travis_wait 100 dub test --arch "$ARCH" --build=unittest-cov
3838
- travis_wait 100 dub test --arch "$ARCH" -c dips
3939
- ./test_examples.sh
40-
- meson build && cd build && ninja -j4 && ninja -j4 test -v && cd .. # TODO: 32bit meson test
40+
- meson build -D with_test=true && cd build && ninja -j4 && ninja -j4 test -v && cd .. # TODO: 32bit meson test
4141
# - travis_wait 100 dub test --arch "$ARCH" --build=unittest-release
4242

4343
after_success:

meson.build

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,6 @@ mir_algorithm_dep = declare_dependency(
5858
dependencies: required_deps,
5959
)
6060

61-
mir_algorithm_test_exe = executable(meson.project_name() + '-test',
62-
mir_algorithm_src,
63-
include_directories: mir_algorithm_dir,
64-
d_unittest: true,
65-
d_module_versions: ['mir_test'],
66-
link_args: '-main',
67-
dependencies: required_deps,
68-
)
69-
7061
install_subdir('include/',
7162
strip_directory :true,
7263
install_dir: 'include/',
@@ -85,4 +76,17 @@ import('pkgconfig').generate(
8576
version: meson.project_version(),
8677
)
8778

88-
test(meson.project_name() + '-test', mir_algorithm_test_exe)
79+
if get_option('with_test')
80+
81+
mir_algorithm_test_exe = executable(meson.project_name() + '-test',
82+
mir_algorithm_src,
83+
include_directories: mir_algorithm_dir,
84+
d_unittest: true,
85+
d_module_versions: ['mir_test'],
86+
link_args: '-main',
87+
dependencies: required_deps,
88+
)
89+
90+
test(meson.project_name() + '-test', mir_algorithm_test_exe)
91+
92+
endif

meson_options.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
option('with_test', type : 'boolean', value : false)

0 commit comments

Comments
 (0)