Skip to content

Commit 5de1f2f

Browse files
author
Will Wray
committed
Silence clang unused variable warnings, disable ndebug
The variables were used in asserts, and asserts were being disabled by environment variables set in the conda environment I'd used to install a recent meson.
1 parent ff8ddac commit 5de1f2f

File tree

5 files changed

+75
-234
lines changed

5 files changed

+75
-234
lines changed

subprojects/packagefiles/snitch_meson_build.patch

Lines changed: 0 additions & 183 deletions
This file was deleted.

subprojects/snitch.wrap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ directory = snitch
33
url = https://github.com/cschreib/snitch.git
44
revision = main
55
depth = 1
6-
#diff_files = snitch_meson_build.patch
76

87
[provide]
98
snitch = snitch_dep

tests/meson.build

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
test('sanity'
22
,executable('tupl_sanity_test'
33
,'tupl_sanity_test.cpp'
4-
,cpp_args : ['-DNAMESPACE_ID=lml']
4+
,override_options: ['b_ndebug=false']
55
,dependencies: [tupl_dep]
66
)
77
)
@@ -10,7 +10,7 @@ if codegen.enabled()
1010
test('amalgam'
1111
,executable('tupl_amalgam_test'
1212
,'tupl_amalgam_test.cpp'
13-
,cpp_args : ['-DNAMESPACE_ID=lml']
13+
,override_options: ['b_ndebug=false']
1414
,dependencies: [tupl_dep, tupl_amalgam_dep]
1515
)
1616
)
@@ -20,8 +20,8 @@ if codegen.allowed()
2020
test('tupl_impl'
2121
,executable('tupl_impl'
2222
,'tupl_test.cpp'
23-
,cpp_args : ['-DTUPL_IMPL_PREPROCESS'
24-
,'-DNAMESPACE_ID=lml']
23+
,cpp_args: ['-DTUPL_IMPL_PREPROCESS']
24+
,override_options: ['b_ndebug=false']
2525
,dependencies: [tupl_dep]
2626
,include_directories: tupl_impl_dir
2727
)
@@ -31,7 +31,8 @@ endif
3131
test('tupl'
3232
,executable('tests'
3333
,'test.cpp'
34-
,cpp_args : ['-DNAMESPACE_ID=']
34+
,cpp_args: ['-DNAMESPACE_ID=']
35+
,override_options: ['b_ndebug=false']
3536
,dependencies: [tupl_dep, snitch_dep]
3637
)
3738
)

tests/test.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,8 @@ void tupl_swap()
684684
assert( ta == tA && tb == tB ); // unswapped
685685

686686
auto maptie = map(ta,[](auto&...a){return tie(a...);});
687+
assert( &get<0>(maptie) == &get<0>(ta) );
688+
maptie = ta;
687689

688690
auto& [a0,a1,a2] = ta;
689691
auto& [b0,b1,b2] = tb;
@@ -715,6 +717,8 @@ void tupl_swap()
715717

716718
tupl noxt = {'\03'};
717719
assert( equals(noxt, {3}) );
720+
noxt = {4};
721+
assert( equals(noxt, {'\04'}) );
718722
tiea = {1,2L,4};
719723
};
720724

0 commit comments

Comments
 (0)