File: CMakeLists.txt

package info (click to toggle)
libpmemobj-cpp 1.12-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 8,388 kB
  • sloc: cpp: 136,076; sh: 1,022; perl: 381; ansic: 163; makefile: 13
file content (973 lines) | stat: -rw-r--r-- 55,044 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2018-2021, Intel Corporation

include(ctest_helpers.cmake)

# ----------------------------------------------------------------- #
## Setup
# ----------------------------------------------------------------- #
add_custom_target(tests)

# Try to find it for some tests using TBB
include(tbb)

# Add checks when DEVELOPER_MODE is ON
add_cppstyle(tests-common ${CMAKE_CURRENT_SOURCE_DIR}/common/*.*pp
						  ${CMAKE_CURRENT_SOURCE_DIR}/*.c
						  ${CMAKE_CURRENT_SOURCE_DIR}/*.h
						  ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp
						  ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp
						  ${CMAKE_CURRENT_SOURCE_DIR}/check_is_pmem/*.*pp
						  ${CMAKE_CURRENT_SOURCE_DIR}/container_generic/*.*pp)

add_check_whitespace(tests-common ${CMAKE_CURRENT_SOURCE_DIR}/common/*.*pp
								  ${CMAKE_CURRENT_SOURCE_DIR}/*.c
								  ${CMAKE_CURRENT_SOURCE_DIR}/*.h
								  ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp
								  ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp
								  ${CMAKE_CURRENT_SOURCE_DIR}/check_is_pmem/*.*pp
								  ${CMAKE_CURRENT_SOURCE_DIR}/container_generic/*.*pp)
add_check_whitespace(tests-cmake ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt)

# Set up compilation flags
if(MSVC_VERSION)
	add_flag(-W2)

	# disable warning C4996 - disable checking iterators
	add_flag(-D_SCL_SECURE_NO_WARNINGS)

	# disable warning C4996 - disable deprecation of getenv and strcpy functions
	add_flag(-D_CRT_SECURE_NO_WARNINGS)

	# fix C1128 raised for some test binaries
	add_flag(-bigobj)

	add_flag("-D_FORTIFY_SOURCE=2" RELEASE)

	# omit function name ambiguity under MSVC++ compiler
	if(MSVC_VERSION GREATER 1919)
		# Each CXX_FLAGS_* variable has its own /Ob setting. By default CMake
		# may set it up with some value, so we replace it (or add, if not found)
		# in the current build to avoid warning D9025.
		replace_or_add_flag("/Ob3" "/Ob[0-9]" ${CMAKE_BUILD_TYPE})
	endif()
else()
	add_flag(-Wall)
	add_flag("-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2" RELEASE)
endif()

add_flag(-Wpointer-arith)
add_flag(-Wunused-macros)
add_flag(-Wsign-conversion)
add_flag(-Wsign-compare)
add_flag(-Wunreachable-code-return)
add_flag(-Wmissing-variable-declarations)
add_flag(-fno-common)

add_flag(-ggdb DEBUG)
add_flag(-DDEBUG DEBUG)

if(USE_ASAN)
	add_sanitizer_flag(address)
endif()
if(USE_UBSAN)
	add_sanitizer_flag(undefined)
endif()

if(COVERAGE)
	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -coverage")
endif()

# Prepare additional libraries/executables and finding required packages
find_packages()
find_gdb()

add_library(test_backtrace STATIC test_backtrace.c)
if(LIBUNWIND_FOUND)
	target_compile_definitions(test_backtrace PUBLIC USE_LIBUNWIND=1)
endif()

add_library(valgrind_internal STATIC valgrind_internal.cpp)

add_executable(check_is_pmem check_is_pmem/check_is_pmem.cpp)
target_link_libraries(check_is_pmem ${LIBPMEM_LIBRARIES})

# ----------------------------------------------------------------- #
## Tests
# ----------------------------------------------------------------- #
# tests using examples
function(build_example_queue)
	add_executable(ex-queue ../examples/queue/queue.cpp)
	target_include_directories(ex-queue PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../examples)
	target_link_libraries(ex-queue ${LIBPMEMOBJ_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
	add_dependencies(tests ex-queue)
endfunction()

function(build_example_pman)
	add_executable(ex-pman ../examples/pman/pman.cpp)
	target_include_directories(ex-pman PUBLIC ${CURSES_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../examples)
	target_link_libraries(ex-pman ${LIBPMEMOBJ_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${CURSES_LIBRARIES})
	add_dependencies(tests ex-pman)
endfunction()

if(BUILD_EXAMPLES AND NO_GCC_VARIADIC_TEMPLATE_BUG)
	build_example_queue()
	add_test_generic(NAME ex-queue CASE 0 TRACERS none SCRIPT ex-queue/ex-queue_0.cmake)

	if(CURSES_FOUND AND NOT WIN32)
		build_example_pman()
		add_test_generic(NAME ex-pman CASE 0 TRACERS none SCRIPT ex-pman/ex-pman_0.cmake)
	elseif(NOT WIN32)
		message(WARNING "ncurses not found - pman test won't be build")
	endif()
elseif(BUILD_EXAMPLES)
	message(WARNING "Skipping examples tests because of gcc variadic template bug")
	skip_test("examples_tests" "SKIPPED_BECAUSE_OF_GCC_VARIADIC_TEMPLATE_BUG")
endif()

# common tests
if(AGGREGATE_INITIALIZATION_AVAILABLE)
	build_test(aggregate_initialization aggregate_initialization/aggregate_initialization.cpp)
	add_test_generic(NAME aggregate_initialization TRACERS none pmemcheck)
else()
	message(WARNING "Skipping aggregate initialization test because of no compiler support")
	skip_test("aggregate_initialization" "SKIPPED_BECAUSE_OF_NO_COMPILER_SUPPORT")
endif()

build_test(allocator allocator/allocator.cpp)
add_test_generic(NAME allocator TRACERS none memcheck pmemcheck)

build_test(detail_common detail_common/detail_common.cpp)
add_test_generic(NAME detail_common TRACERS none)

build_test(make_persistent make_persistent/make_persistent.cpp)
add_test_generic(NAME make_persistent TRACERS none pmemcheck)

build_test(make_persistent_atomic make_persistent/make_persistent_atomic.cpp)
add_test_generic(NAME make_persistent_atomic TRACERS none pmemcheck)

if(NOT WIN32)
	build_test(mutex_posix mutex/mutex_posix.cpp)
	add_test_generic(NAME mutex_posix TRACERS drd helgrind pmemcheck)
endif()

build_test(pair pair/pair.cpp)
add_test_generic(NAME pair TRACERS none memcheck)

build_test(pool pool/pool.cpp)
add_test_generic(NAME pool CASE 0 TRACERS none)
add_test_generic(NAME pool CASE 1 TRACERS none)
add_test_generic(NAME pool CASE 2 TRACERS none)
add_test_generic(NAME pool CASE 3 TRACERS none)
add_test_generic(NAME pool CASE 4 TRACERS none)
add_test_generic(NAME pool CASE 5 TRACERS none)

if(WIN32)
	build_test(pool_win pool/pool_win.cpp)
	add_test_generic(NAME pool_win CASE 0 TRACERS none SCRIPT pool/pool_win_0.cmake)
	add_test_generic(NAME pool_win CASE 1 TRACERS none SCRIPT pool/pool_win_1.cmake)
	add_test_generic(NAME pool_win CASE 2 TRACERS none SCRIPT pool/pool_win_2.cmake)
	add_test_generic(NAME pool_win CASE 3 TRACERS none SCRIPT pool/pool_win_3.cmake)
endif()

build_test(pool_cleanup pool/pool_cleanup.cpp)
add_test_generic(NAME pool_cleanup TRACERS none pmemcheck memcheck drd helgrind CASE 0
		SCRIPT pool/pool_cleanup_0.cmake)

build_test(pool_primitives pool/pool_primitives.cpp)
add_test_generic(NAME pool_primitives CASE 0 TRACERS none pmemcheck
		SCRIPT cmake/common_0.cmake)

build_test(ptr ptr/ptr.cpp)
add_test_generic(NAME ptr CASE 0 TRACERS none pmemcheck
		SCRIPT cmake/common_0.cmake)

build_test(ptr_arith ptr/ptr_arith.cpp)
add_test_generic(NAME ptr_arith TRACERS memcheck pmemcheck)
# XXX Bug: incompatibility between asan and custom library
if(NOT USE_ASAN)
	add_test_generic(NAME ptr_arith TRACERS none)
endif()

build_test(p_ext p_ext/p_ext.cpp)
add_test_generic(NAME p_ext TRACERS none pmemcheck)

if(NOT WIN32)
	build_test(shared_mutex_posix mutex/shared_mutex_posix.cpp)
	add_test_generic(NAME shared_mutex_posix TRACERS drd helgrind pmemcheck)
endif()

build_test_ext(NAME transaction_common_flat SRC_FILES transaction/transaction.cpp BUILD_OPTIONS -DLIBPMEMOBJ_CPP_USE_FLAT_TRANSACTION)
add_test_generic(NAME transaction_common_flat TRACERS none pmemcheck memcheck)

build_test_ext(NAME transaction_common_basic SRC_FILES transaction/transaction.cpp)
add_test_generic(NAME transaction_common_basic TRACERS none pmemcheck memcheck)

build_test_ext(NAME transaction_flat SRC_FILES transaction/transaction_flat.cpp BUILD_OPTIONS -DLIBPMEMOBJ_CPP_USE_FLAT_TRANSACTION)
add_test_generic(NAME transaction_flat TRACERS none pmemcheck memcheck)

build_test_ext(NAME transaction_basic SRC_FILES transaction/transaction_basic.cpp)
add_test_generic(NAME transaction_basic TRACERS none pmemcheck memcheck)

if(VOLATILE_STATE_PRESENT)
	build_test(volatile_state volatile_state/volatile_state.cpp)
	add_test_generic(NAME volatile_state TRACERS none pmemcheck memcheck drd helgrind)
endif()

build_test(v v/v.cpp)
add_test_generic(NAME v CASE 0 TRACERS none memcheck SCRIPT cmake/common_0.cmake)

if(NO_CHRONO_BUG)
	build_test(cond_var cond_var/cond_var.cpp)
	add_test_generic(NAME cond_var TRACERS none)

	if(NOT WIN32)
		build_test(cond_var_posix cond_var/cond_var_posix.cpp)
		add_test_generic(NAME cond_var_posix TRACERS drd helgrind pmemcheck)
	endif()

	build_test(mutex mutex/mutex.cpp)
	add_test_generic(NAME mutex TRACERS none)

	build_test(shared_mutex mutex/shared_mutex.cpp)
	add_test_generic(NAME shared_mutex TRACERS none)

	if(NOT WIN32)
		build_test(timed_mtx_posix mutex/timed_mtx_posix.cpp)
		add_test_generic(NAME timed_mtx_posix TRACERS drd helgrind pmemcheck)
	endif()

	build_test(timed_mtx mutex/timed_mtx.cpp)
	add_test_generic(NAME timed_mtx TRACERS none)
else()
	message(WARNING "Skipping chrono tests because of compiler/stdc++ issues")
	skip_test("chrono_tests" "SKIPPED_BECAUSE_OF_COMPILER_CHRONO_BUG")
endif()

if(NO_CLANG_TEMPLATE_BUG)
	build_test(make_persistent_array make_persistent/make_persistent_array.cpp)
	add_test_generic(NAME make_persistent_array TRACERS none pmemcheck)

	build_test(make_persistent_array_atomic make_persistent/make_persistent_array_atomic.cpp)
	add_test_generic(NAME make_persistent_array_atomic TRACERS none pmemcheck)
else()
	message(WARNING "Skipping array tests because of clang template bug")
	skip_test("make_persistent_array" "SKIPPED_BECAUSE_OF_CLANG_TEMPLATE_BUG")
	skip_test("make_persistent_array_atomic" "SKIPPED_BECAUSE_OF_CLANG_TEMPLATE_BUG")
endif()

build_test(iterator_traits iterator_traits/iterator_traits.cpp)
add_test_generic(NAME iterator_traits TRACERS none)

build_test(ctl ctl/ctl.cpp)
add_test_generic(NAME ctl CASE 0 TRACERS none)

if(WIN32)
	build_test(ctl_win ctl_win/ctl_win.cpp)
	add_test_generic(NAME ctl_win CASE 0 TRACERS none SCRIPT ctl/ctl_0.cmake)
endif()

build_test(defrag defrag/defrag.cpp)
add_test_generic(NAME defrag TRACERS none pmemcheck memcheck)

build_test(string_view string_view/string_view.cpp)
add_test_generic(NAME string_view TRACERS none memcheck)

build_test(inline_string inline_string/inline_string.cpp)
add_test_generic(NAME inline_string TRACERS none memcheck pmemcheck)

if(TEST_SELF_RELATIVE_POINTER)
	build_test(self_relative_ptr ptr/self_relative_ptr.cpp)
	add_test_generic(NAME self_relative_ptr TRACERS none memcheck pmemcheck)

	build_test(self_relative_ptr_arith ptr/self_relative_ptr_arith.cpp)
	add_test_generic(NAME self_relative_ptr_arith TRACERS none memcheck pmemcheck)

	build_test_atomic(self_relative_ptr_atomic ptr/self_relative_ptr_atomic.cpp)
	add_test_generic(NAME self_relative_ptr_atomic TRACERS none memcheck drd helgrind)

	build_test_atomic(self_relative_ptr_atomic_pmem ptr/self_relative_ptr_atomic_pmem.cpp)
	add_test_generic(NAME self_relative_ptr_atomic_pmem TRACERS none memcheck pmemcheck drd helgrind)
endif()

add_subdirectory(external)

if(TESTS_COMPATIBILITY)
	add_subdirectory(compatibility)
endif()

# Containers tests
###################################### ARRAY ###################################
if(TEST_ARRAY)
	build_test(array_algorithms array/array_algorithms.cpp)
	add_test_generic(NAME array_algorithms TRACERS none pmemcheck)

	build_test(array_slice array/array_slice.cpp)
	add_test_generic(NAME array_slice CASE 0 TRACERS none pmemcheck memcheck SCRIPT array/array_slice_0.cmake)

	build_test(array_iterator array/array_iterator.cpp)
	add_test_generic(NAME array_iterator TRACERS none pmemcheck)

	build_test(array_iterator_noconv array/array_iterator_noconv.cpp)
	check_cxx_compiler_flag(-Wno-sign-conversion NO_SIGN_CONVERSION_FLAG)
	if(NO_SIGN_CONVERSION_FLAG)
		target_compile_options(array_iterator_noconv PUBLIC -Wno-sign-conversion)
	endif()
	add_test_generic(NAME array_iterator_noconv TRACERS none)

	if(NOT CLANG_DESTRUCTOR_REFERENCE_BUG_PRESENT)
		build_test(array_modifiers array/array_modifiers.cpp)
		add_test_generic(NAME array_modifiers TRACERS none pmemcheck memcheck)
	else()
		message(WARNING "skipping array_modifiers test - it requires clang >= ${CLANG_REQUIRED_BY_DESTRUCTOR_REFERENCE_BUG}")
	endif()

	if(PMREORDER_SUPPORTED)
		build_test(array_slice_pmreorder array/array_slice_pmreorder.cpp)
		add_test_generic(NAME array_slice_pmreorder CASE 0 TRACERS none SCRIPT array/array_slice_pmreorder_0.cmake)
		add_test_generic(NAME array_slice_pmreorder CASE 1 TRACERS none SCRIPT array/array_slice_pmreorder_1.cmake)
	else()
		message(WARNING "Skipping pmreorder tests because of no pmreorder support")
	endif()
endif()
################################################################################
###################################### VECTOR ##################################
if(TEST_VECTOR)
	build_test_ext(NAME vector_temp_value SRC_FILES temp_value/temp_value.cpp BUILD_OPTIONS -DVECTOR)
	add_test_generic(NAME vector_temp_value TRACERS none pmemcheck memcheck)

	build_test_ext(NAME vector_assign_exceptions_length SRC_FILES vector/vector_assign_exceptions_length.cpp BUILD_OPTIONS -DVECTOR)

	# array-bounds warning is expected
	check_cxx_compiler_flag(-Wno-array-bounds wno_array_bounds_flag)
	if(wno_array_bounds_flag)
		target_compile_options(vector_assign_exceptions_length PUBLIC -Wno-array-bounds)
	endif()

	add_test_generic(NAME vector_assign_exceptions_length TRACERS none memcheck pmemcheck)

	build_test_ext(NAME vector_assign_exceptions_oom SRC_FILES vector/vector_assign_exceptions_oom.cpp BUILD_OPTIONS -DVECTOR)
	add_test_generic(NAME vector_assign_exceptions_oom TRACERS none memcheck pmemcheck)

	build_test_ext(NAME vector_assign_txabort SRC_FILES vector/vector_assign_txabort.cpp BUILD_OPTIONS -DVECTOR)
	add_test_generic(NAME vector_assign_txabort TRACERS none memcheck pmemcheck)

	build_test_ext(NAME vector_comp_operators SRC_FILES vector/vector_comp_operators.cpp BUILD_OPTIONS -DVECTOR)
	add_test_generic(NAME vector_comp_operators TRACERS none memcheck pmemcheck)

	build_test_ext(NAME vector_capacity_exceptions_length SRC_FILES vector/vector_capacity_exceptions_length.cpp BUILD_OPTIONS -DVECTOR)
	add_test_generic(NAME vector_capacity_exceptions_length TRACERS none memcheck pmemcheck)

	build_test_ext(NAME vector_capacity_exceptions_oom SRC_FILES vector/vector_capacity_exceptions_oom.cpp BUILD_OPTIONS -DVECTOR)
	add_test_generic(NAME vector_capacity_exceptions_oom TRACERS none memcheck pmemcheck)

	build_test_ext(NAME vector_capacity_txabort SRC_FILES vector/vector_capacity_txabort.cpp BUILD_OPTIONS -DVECTOR)
	add_test_generic(NAME vector_capacity_txabort TRACERS none memcheck pmemcheck)

	build_test_ext(NAME vector_ctor_exceptions_nopmem SRC_FILES vector/vector_ctor_exceptions_nopmem.cpp BUILD_OPTIONS -DVECTOR)
	add_test_generic(NAME vector_ctor_exceptions_nopmem TRACERS none memcheck )

	build_test_ext(NAME vector_ctor_exceptions_notx SRC_FILES vector/vector_ctor_exceptions_notx.cpp BUILD_OPTIONS -DVECTOR)
	add_test_generic(NAME vector_ctor_exceptions_notx TRACERS none memcheck)

	build_test_ext(NAME vector_ctor_exceptions_oom SRC_FILES vector/vector_ctor_exceptions_oom.cpp BUILD_OPTIONS -DVECTOR)
	add_test_generic(NAME vector_ctor_exceptions_oom TRACERS none memcheck pmemcheck)

	build_test_ext(NAME vector_ctor_move SRC_FILES vector/vector_ctor_move.cpp BUILD_OPTIONS -DVECTOR)
	add_test_generic(NAME vector_ctor_move TRACERS none memcheck pmemcheck)

	build_test_ext(NAME vector_ctor_capacity SRC_FILES vector/vector_ctor_capacity.cpp BUILD_OPTIONS -DVECTOR)
	add_test_generic(NAME vector_ctor_capacity TRACERS none memcheck pmemcheck)

	build_test_ext(NAME vector_dtor SRC_FILES vector/vector_dtor.cpp BUILD_OPTIONS -DVECTOR)
	add_test_generic(NAME vector_dtor TRACERS none memcheck pmemcheck)

	build_test_ext(NAME vector_iterators_access SRC_FILES vector/vector_iterators_access.cpp BUILD_OPTIONS -DVECTOR)
	add_test_generic(NAME vector_iterators_access TRACERS none memcheck pmemcheck)

	build_test_ext(NAME vector_data_access SRC_FILES vector/vector_data_access.cpp BUILD_OPTIONS -DVECTOR)
	add_test_generic(NAME vector_data_access TRACERS none memcheck pmemcheck)

	build_test_ext(NAME vector_ctor_check_copy SRC_FILES vector/vector_ctor_check_copy.cpp BUILD_OPTIONS -DVECTOR)
	add_test_generic(NAME vector_ctor_check_copy TRACERS none memcheck pmemcheck)

	build_test_ext(NAME vector_modifiers_exceptions_oom SRC_FILES vector/vector_modifiers_exceptions_oom.cpp BUILD_OPTIONS -DVECTOR)
	add_test_generic(NAME vector_modifiers_exceptions_oom TRACERS none memcheck pmemcheck)

	build_test_ext(NAME vector_modifiers_txabort SRC_FILES vector/vector_modifiers_txabort.cpp BUILD_OPTIONS -DVECTOR)
	add_test_generic(NAME vector_modifiers_txabort TRACERS none memcheck pmemcheck)

	build_test_ext(NAME vector_modifiers_type_requirements SRC_FILES vector/vector_modifiers_type_requirements.cpp BUILD_OPTIONS -DVECTOR)
	add_test_generic(NAME vector_modifiers_type_requirements TRACERS none memcheck pmemcheck)

	build_test_ext(NAME vector_std_arg SRC_FILES vector/vector_std_arg.cpp BUILD_OPTIONS -DVECTOR)
	add_test_generic(NAME vector_std_arg TRACERS none memcheck pmemcheck)

	build_test_ext(NAME vector_range SRC_FILES vector/vector_range.cpp BUILD_OPTIONS -DVECTOR)
	add_test_generic(NAME vector_range TRACERS none memcheck pmemcheck)

	build_test_ext(NAME vector_parameters SRC_FILES vector/vector_parameters.cpp BUILD_OPTIONS -DVECTOR)
	add_test_generic(NAME vector_parameters TRACERS none memcheck pmemcheck)

	build_test_ext(NAME vector_layout SRC_FILES vector/vector_layout.cpp BUILD_OPTIONS -DVECTOR)
	add_test_generic(NAME vector_layout TRACERS none)

	build_test(defrag_vector defrag/defrag_vector.cpp)
	add_test_generic(NAME defrag_vector TRACERS none pmemcheck memcheck)
endif()
################################################################################
###################################### STRING ##################################
if(TEST_STRING)
	build_test(string_access string/string_access.cpp)
	add_test_generic(NAME string_access TRACERS none memcheck pmemcheck)

	build_test(string_capacity string/string_capacity.cpp)
	add_test_generic(NAME string_capacity TRACERS none memcheck pmemcheck)

	build_test(string_exceptions string/string_exceptions.cpp)
	add_test_generic(NAME string_exceptions TRACERS none memcheck pmemcheck)

	build_test(string_modifiers string/string_modifiers.cpp)
	add_test_generic(NAME string_modifiers TRACERS none memcheck pmemcheck)

	build_test(string_swap string/string_swap.cpp)
	add_test_generic(NAME string_swap TRACERS none memcheck pmemcheck)

	build_test(string_snapshot string/string_snapshot.cpp)
	add_test_generic(NAME string_snapshot TRACERS none memcheck pmemcheck)

	build_test(string_assign_tx_abort string/string_assign_tx_abort.cpp)
	add_test_generic(NAME string_assign_tx_abort TRACERS none memcheck pmemcheck)

	build_test(string_layout string/string_layout.cpp)
	add_test_generic(NAME string_layout TRACERS none)

	build_test(string_range string/string_range.cpp)
	add_test_generic(NAME string_range TRACERS none memcheck pmemcheck)
endif()
################################################################################
############################### CONCURRENT_HASHMAP #############################
if(TEST_CONCURRENT_HASHMAP)
	build_test(concurrent_hash_map_tx concurrent_hash_map/concurrent_hash_map_tx.cpp)
	add_test_generic(NAME concurrent_hash_map_tx TRACERS none memcheck pmemcheck)

	build_test(concurrent_hash_map_insert_or_assign concurrent_hash_map/concurrent_hash_map_insert_or_assign.cpp)
	add_test_generic(NAME concurrent_hash_map_insert_or_assign TRACERS none memcheck pmemcheck helgrind drd)

	build_test(concurrent_hash_map_insert_lookup concurrent_hash_map/concurrent_hash_map_insert_lookup.cpp)
	add_test_generic(NAME concurrent_hash_map_insert_lookup CASE 0 TRACERS none
			SCRIPT concurrent_hash_map/check_is_pmem.cmake)

	build_test_defrag(concurrent_hash_map_insert_lookup_mock concurrent_hash_map/concurrent_hash_map_insert_lookup.cpp)
	add_test_generic(NAME concurrent_hash_map_insert_lookup_mock CASE 0 TRACERS memcheck pmemcheck
			SCRIPT concurrent_hash_map/check_is_pmem.cmake)

	if(TESTS_CONCURRENT_HASH_MAP_DRD_HELGRIND AND TESTS_LONG)
		add_test_generic(NAME concurrent_hash_map_insert_lookup_mock CASE 0 TRACERS helgrind drd
				SCRIPT concurrent_hash_map/check_is_pmem.cmake)
	endif()

	build_test(concurrent_hash_map_insert_erase concurrent_hash_map/concurrent_hash_map_insert_erase.cpp)
	add_test_generic(NAME concurrent_hash_map_insert_erase CASE 0 TRACERS none
			SCRIPT concurrent_hash_map/check_is_pmem.cmake)
	add_test_generic(NAME concurrent_hash_map_insert_erase CASE 1 TRACERS none
			SCRIPT concurrent_hash_map/check_is_pmem.cmake)

	build_test_defrag(concurrent_hash_map_insert_erase_mock concurrent_hash_map/concurrent_hash_map_insert_erase.cpp)
	add_test_generic(NAME concurrent_hash_map_insert_erase_mock CASE 0 TRACERS memcheck pmemcheck
			SCRIPT concurrent_hash_map/check_is_pmem.cmake)
	add_test_generic(NAME concurrent_hash_map_insert_erase_mock CASE 1 TRACERS memcheck pmemcheck
			SCRIPT concurrent_hash_map/check_is_pmem_defrag.cmake)

	if(TESTS_CONCURRENT_HASH_MAP_DRD_HELGRIND)
		add_test_generic(NAME concurrent_hash_map_insert_erase_mock CASE 0 TRACERS helgrind drd
			SCRIPT concurrent_hash_map/check_is_pmem.cmake)
		add_test_generic(NAME concurrent_hash_map_insert_erase_mock CASE 1 TRACERS helgrind drd
			SCRIPT concurrent_hash_map/check_is_pmem_defrag.cmake)
	endif()

	# This test should not be run under helgrind due to intermittent failures (most probably false-positive, ref. issue #469)
	build_test(concurrent_hash_map_rehash concurrent_hash_map/concurrent_hash_map_rehash.cpp)
	add_test_generic(NAME concurrent_hash_map_rehash CASE 0 TRACERS none
			SCRIPT concurrent_hash_map/check_is_pmem.cmake)
	add_test_generic(NAME concurrent_hash_map_rehash CASE 1 TRACERS none
			SCRIPT concurrent_hash_map/check_is_pmem_defrag.cmake)

	build_test_defrag(concurrent_hash_map_rehash_mock concurrent_hash_map/concurrent_hash_map_rehash.cpp)
	add_test_generic(NAME concurrent_hash_map_rehash_mock CASE 0 TRACERS memcheck pmemcheck
			SCRIPT concurrent_hash_map/check_is_pmem.cmake)
	add_test_generic(NAME concurrent_hash_map_rehash_mock CASE 1 TRACERS memcheck pmemcheck
			SCRIPT concurrent_hash_map/check_is_pmem_defrag.cmake)

	if(TESTS_CONCURRENT_HASH_MAP_DRD_HELGRIND)
		# This test should not be run under helgrind due to intermittent failures (most probably false-positive, ref. issue #469)
		if(TESTS_LONG)
			add_test_generic(NAME concurrent_hash_map_rehash_mock CASE 0 TRACERS drd
					SCRIPT concurrent_hash_map/check_is_pmem.cmake)
			add_test_generic(NAME concurrent_hash_map_rehash_mock CASE 1 TRACERS drd
					SCRIPT concurrent_hash_map/check_is_pmem_defrag.cmake)
		endif()
	endif()

	build_test(concurrent_hash_map_rehash_recursive concurrent_hash_map/concurrent_hash_map_rehash_recursive.cpp)
	add_test_generic(NAME concurrent_hash_map_rehash_recursive CASE 0 TRACERS none
			SCRIPT concurrent_hash_map/check_is_pmem.cmake)

	build_test_defrag(concurrent_hash_map_rehash_recursive_mock concurrent_hash_map/concurrent_hash_map_rehash_recursive.cpp)
	add_test_generic(NAME concurrent_hash_map_rehash_recursive_mock CASE 0 TRACERS memcheck pmemcheck
			SCRIPT concurrent_hash_map/check_is_pmem.cmake)

	if(TESTS_CONCURRENT_HASH_MAP_DRD_HELGRIND AND TESTS_LONG)
		add_test_generic(NAME concurrent_hash_map_rehash_recursive_mock CASE 0 TRACERS helgrind drd
				SCRIPT concurrent_hash_map/check_is_pmem.cmake)
	endif()

	build_test(concurrent_hash_map_rehash_deadlock concurrent_hash_map/concurrent_hash_map_rehash_deadlock.cpp)
	add_test_generic(NAME concurrent_hash_map_rehash_deadlock CASE 0 TRACERS none
			SCRIPT concurrent_hash_map/check_is_pmem.cmake)

	# this single-threaded test should not be run under helgrind/drd, because a false-positive deadlock can be detected
	build_test_defrag(concurrent_hash_map_rehash_deadlock_mock concurrent_hash_map/concurrent_hash_map_rehash_deadlock.cpp)
	add_test_generic(NAME concurrent_hash_map_rehash_deadlock_mock CASE 0 TRACERS memcheck pmemcheck
			SCRIPT concurrent_hash_map/check_is_pmem.cmake)

	build_test(concurrent_hash_map_defrag concurrent_hash_map/concurrent_hash_map_defrag.cpp)
	add_test_generic(NAME concurrent_hash_map_defrag TRACERS none)

	# This test can NOT be run under helgrind as it will report wrong lock ordering. Helgrind is right about
	# possible deadlock situation, but that could only happen in case of wrong API usage.
	build_test(concurrent_hash_map_deadlock concurrent_hash_map/concurrent_hash_map_deadlock.cpp)
	add_test_generic(NAME concurrent_hash_map_deadlock CASE 0 TRACERS none drd memcheck pmemcheck
			SCRIPT concurrent_hash_map/check_is_pmem.cmake)

	build_test(concurrent_hash_map_insert_reopen concurrent_hash_map/concurrent_hash_map_insert_reopen.cpp)
	add_test_generic(NAME concurrent_hash_map_insert_reopen CASE 0 TRACERS none memcheck pmemcheck
			SCRIPT concurrent_hash_map/check_is_pmem.cmake)

	if(TESTS_CONCURRENT_HASH_MAP_DRD_HELGRIND)
		add_test_generic(NAME concurrent_hash_map_insert_reopen CASE 0 TRACERS drd helgrind
				SCRIPT concurrent_hash_map/check_is_pmem.cmake)
	endif()

	build_test_ext(NAME concurrent_hash_map_insert_reopen_deprecated SRC_FILES concurrent_hash_map/concurrent_hash_map_insert_reopen.cpp
			BUILD_OPTIONS -DUSE_DEPRECATED_RUNTIME_INITIALIZE)
	check_cxx_compiler_flag(-Wdeprecated-declarations deprecated_declarations)
	if(deprecated_declarations)
		target_compile_options(concurrent_hash_map_insert_reopen_deprecated PUBLIC -Wno-deprecated-declarations)
	endif()
	add_test_generic(NAME concurrent_hash_map_insert_reopen_deprecated TRACERS none)

	build_test(concurrent_hash_map_rehash_check concurrent_hash_map/concurrent_hash_map_rehash_check.cpp)
	add_test_generic(NAME concurrent_hash_map_rehash_check TRACERS none memcheck pmemcheck)

	build_test(concurrent_hash_map_singlethread concurrent_hash_map/concurrent_hash_map_singlethread.cpp)
	add_test_generic(NAME concurrent_hash_map_singlethread TRACERS none memcheck pmemcheck)

	build_test(concurrent_hash_map_layout concurrent_hash_map/concurrent_hash_map_layout.cpp)
	add_test_generic(NAME concurrent_hash_map_layout TRACERS none)

	if(GDB_FOUND)
		build_test(concurrent_hash_map_rehash_break concurrent_hash_map_rehash_break/concurrent_hash_map_rehash_break.cpp)

		if(NOT WIN32)
			# add 2 concurrent_hash_map_rehash_break tests
			set(CURRENT_TEST_DIR ${CMAKE_CURRENT_SOURCE_DIR}/concurrent_hash_map_rehash_break)
			set(CMAKE_SCRIPT ${CURRENT_TEST_DIR}/concurrent_hash_map_rehash_break)
			foreach(TESTCASE RANGE 1)
				configure_file("${CMAKE_SCRIPT}.cmake.in" "${CMAKE_SCRIPT}_${TESTCASE}.cmake" @ONLY)
				add_test_generic(NAME concurrent_hash_map_rehash_break CASE ${TESTCASE} TRACERS none)
			endforeach()
		endif()
	else()
		message(WARNING "Skipping concurrent_hash_map_rehash_break test because GDB was not found")
	endif()

	if(NOT TESTS_TBB)
		message(WARNING "Skipping concurrent_hash_map_tbb tests - disabled by cmake TESTS_TBB option")
	else()
		build_test_tbb(concurrent_hash_map_tbb_insert_lookup concurrent_hash_map/concurrent_hash_map_tbb_insert_lookup.cpp)
		add_test_generic(NAME concurrent_hash_map_tbb_insert_lookup TRACERS none
				SCRIPT concurrent_hash_map/check_is_pmem.cmake)

		build_test_tbb_defrag(concurrent_hash_map_tbb_insert_lookup_mock concurrent_hash_map/concurrent_hash_map_tbb_insert_lookup.cpp)
		add_test_generic(NAME concurrent_hash_map_tbb_insert_lookup_mock TRACERS pmemcheck
				SCRIPT concurrent_hash_map/check_is_pmem.cmake)

		build_test_tbb(concurrent_hash_map_tbb_insert_erase concurrent_hash_map/concurrent_hash_map_tbb_insert_erase.cpp)
		add_test_generic(NAME concurrent_hash_map_tbb_insert_erase TRACERS none
				SCRIPT concurrent_hash_map/check_is_pmem.cmake)

		build_test_tbb_defrag(concurrent_hash_map_tbb_insert_erase_mock concurrent_hash_map/concurrent_hash_map_tbb_insert_erase.cpp)
		add_test_generic(NAME concurrent_hash_map_tbb_insert_erase_mock TRACERS pmemcheck
				SCRIPT concurrent_hash_map/check_is_pmem.cmake)
	endif()

	if(PMREORDER_SUPPORTED)
		build_test(concurrent_hash_map_pmreorder_simple concurrent_hash_map/concurrent_hash_map_pmreorder_simple.cpp)
		add_test_generic(NAME concurrent_hash_map_pmreorder_simple CASE 0 TRACERS none
				SCRIPT cmake/pmreorder.cmake)

		build_test(concurrent_hash_map_pmreorder_multiple_buckets concurrent_hash_map_pmreorder_multiple_buckets/concurrent_hash_map_pmreorder_multiple_buckets.cpp)
		add_test_generic(NAME concurrent_hash_map_pmreorder_multiple_buckets CASE 0 TRACERS none
				SCRIPT cmake/pmreorder.cmake)

		build_test(concurrent_hash_map_pmreorder_erase concurrent_hash_map_pmreorder_erase/concurrent_hash_map_pmreorder_erase.cpp)
		add_test_generic(NAME concurrent_hash_map_pmreorder_erase CASE 0 TRACERS none)

		if(GDB_FOUND)
			set(TEST concurrent_hash_map_pmreorder_break_insert)
			build_test(${TEST} ${TEST}/${TEST}.cpp)

			# add 5 concurrent_hash_map_pmreorder_break_insert test cases
			set(CURRENT_TEST_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${TEST})
			set(CMAKE_SCRIPT ${CURRENT_TEST_DIR}/${TEST})
			set(GDB_SCRIPT ${CURRENT_TEST_DIR}/break_before_persist)
			foreach(case RANGE 4)
				math(EXPR IGNORE "${case} + 1")
				math(EXPR PERSIST "${case} + 2")
				configure_file("${GDB_SCRIPT}.gdb.in" "${GDB_SCRIPT}_${PERSIST}.gdb" @ONLY)
				configure_file("${CMAKE_SCRIPT}.cmake.in" "${CMAKE_SCRIPT}_${case}.cmake" @ONLY)
				add_test_generic(NAME ${TEST} CASE ${case} TRACERS none)
			endforeach()
		else()
			message(WARNING "Skipping concurrent_hash_map_pmreorder_break_insert test because GDB was not found")
		endif()
	else()
		message(WARNING "Skipping pmreorder tests because of no pmreorder support")
	endif()
endif()
################################################################################
################################# SEGMENT_VECTOR ###############################
if(TEST_SEGMENT_VECTOR_ARRAY_EXPSIZE)
	build_test_ext(NAME segment_vector_array_expsize_temp_value SRC_FILES temp_value/temp_value.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_ARRAY_EXPSIZE)
	add_test_generic(NAME segment_vector_array_expsize_temp_value TRACERS none pmemcheck memcheck)

	build_test_ext(NAME segment_vector_array_expsize_assign_exceptions_length SRC_FILES vector/vector_assign_exceptions_length.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_ARRAY_EXPSIZE)
	add_test_generic(NAME segment_vector_array_expsize_assign_exceptions_length TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_array_expsize_assign_exceptions_oom SRC_FILES vector/vector_assign_exceptions_oom.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_ARRAY_EXPSIZE)
	add_test_generic(NAME segment_vector_array_expsize_assign_exceptions_oom TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_array_expsize_assign_txabort SRC_FILES vector/vector_assign_txabort.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_ARRAY_EXPSIZE)
	add_test_generic(NAME segment_vector_array_expsize_assign_txabort TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_array_expsize_comp_operators SRC_FILES vector/vector_comp_operators.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_ARRAY_EXPSIZE)
	add_test_generic(NAME segment_vector_array_expsize_comp_operators TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_array_expsize_capacity_exceptions_length SRC_FILES vector/vector_capacity_exceptions_length.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_ARRAY_EXPSIZE)
	add_test_generic(NAME segment_vector_array_expsize_capacity_exceptions_length TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_array_expsize_capacity_exceptions_oom SRC_FILES vector/vector_capacity_exceptions_oom.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_ARRAY_EXPSIZE)
	add_test_generic(NAME segment_vector_array_expsize_capacity_exceptions_oom TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_array_expsize_capacity_txabort SRC_FILES vector/vector_capacity_txabort.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_ARRAY_EXPSIZE)
	add_test_generic(NAME segment_vector_array_expsize_capacity_txabort TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_array_expsize_ctor_exceptions_nopmem SRC_FILES vector/vector_ctor_exceptions_nopmem.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_ARRAY_EXPSIZE)
	add_test_generic(NAME segment_vector_array_expsize_ctor_exceptions_nopmem TRACERS none memcheck )

	build_test_ext(NAME segment_vector_array_expsize_ctor_exceptions_notx SRC_FILES vector/vector_ctor_exceptions_notx.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_ARRAY_EXPSIZE)
	add_test_generic(NAME segment_vector_array_expsize_ctor_exceptions_notx TRACERS none memcheck)

	build_test_ext(NAME segment_vector_array_expsize_ctor_exceptions_oom SRC_FILES vector/vector_ctor_exceptions_oom.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_ARRAY_EXPSIZE)
	add_test_generic(NAME segment_vector_array_expsize_ctor_exceptions_oom TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_array_expsize_ctor_move SRC_FILES vector/vector_ctor_move.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_ARRAY_EXPSIZE)
	add_test_generic(NAME segment_vector_array_expsize_ctor_move TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_array_expsize_ctor_capacity SRC_FILES vector/vector_ctor_capacity.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_ARRAY_EXPSIZE)
	add_test_generic(NAME segment_vector_array_expsize_ctor_capacity TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_array_expsize_dtor SRC_FILES vector/vector_dtor.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_ARRAY_EXPSIZE)
	add_test_generic(NAME segment_vector_array_expsize_dtor TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_array_expsize_iterators_access SRC_FILES vector/vector_iterators_access.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_ARRAY_EXPSIZE)
	add_test_generic(NAME segment_vector_array_expsize_iterators_access TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_array_expsize_ctor_check_copy SRC_FILES vector/vector_ctor_check_copy.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_ARRAY_EXPSIZE)
	add_test_generic(NAME segment_vector_array_expsize_ctor_check_copy TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_array_expsize_modifiers_exceptions_oom SRC_FILES vector/vector_modifiers_exceptions_oom.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_ARRAY_EXPSIZE)
	add_test_generic(NAME segment_vector_array_expsize_modifiers_exceptions_oom TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_array_expsize_modifiers_txabort SRC_FILES vector/vector_modifiers_txabort.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_ARRAY_EXPSIZE)
	add_test_generic(NAME segment_vector_array_expsize_modifiers_txabort TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_array_expsize_modifiers_type_requirements SRC_FILES vector/vector_modifiers_type_requirements.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_ARRAY_EXPSIZE)
	add_test_generic(NAME segment_vector_array_expsize_modifiers_type_requirements TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_array_expsize_std_arg SRC_FILES vector/vector_std_arg.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_ARRAY_EXPSIZE)
	add_test_generic(NAME segment_vector_array_expsize_std_arg TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_array_expsize_parameters SRC_FILES vector/vector_parameters.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_ARRAY_EXPSIZE)
	add_test_generic(NAME segment_vector_array_expsize_parameters TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_array_expsize_layout SRC_FILES vector/vector_layout.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_ARRAY_EXPSIZE)
	add_test_generic(NAME segment_vector_array_expsize_layout TRACERS none)
endif()

if(TEST_SEGMENT_VECTOR_VECTOR_EXPSIZE)
	build_test_ext(NAME segment_vector_vector_expsize_temp_value SRC_FILES temp_value/temp_value.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_EXPSIZE)
	add_test_generic(NAME segment_vector_vector_expsize_temp_value TRACERS none pmemcheck memcheck)

	build_test_ext(NAME segment_vector_vector_expsize_assign_exceptions_length SRC_FILES vector/vector_assign_exceptions_length.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_EXPSIZE)
	add_test_generic(NAME segment_vector_vector_expsize_assign_exceptions_length TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_expsize_assign_exceptions_oom SRC_FILES vector/vector_assign_exceptions_oom.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_EXPSIZE)
	add_test_generic(NAME segment_vector_vector_expsize_assign_exceptions_oom TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_expsize_assign_txabort SRC_FILES vector/vector_assign_txabort.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_EXPSIZE)
	add_test_generic(NAME segment_vector_vector_expsize_assign_txabort TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_expsize_comp_operators SRC_FILES vector/vector_comp_operators.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_EXPSIZE)
	add_test_generic(NAME segment_vector_vector_expsize_comp_operators TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_expsize_capacity_exceptions_length SRC_FILES vector/vector_capacity_exceptions_length.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_EXPSIZE)
	add_test_generic(NAME segment_vector_vector_expsize_capacity_exceptions_length TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_expsize_capacity_exceptions_oom SRC_FILES vector/vector_capacity_exceptions_oom.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_EXPSIZE)
	add_test_generic(NAME segment_vector_vector_expsize_capacity_exceptions_oom TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_expsize_capacity_txabort SRC_FILES vector/vector_capacity_txabort.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_EXPSIZE)
	add_test_generic(NAME segment_vector_vector_expsize_capacity_txabort TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_expsize_ctor_exceptions_nopmem SRC_FILES vector/vector_ctor_exceptions_nopmem.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_EXPSIZE)
	add_test_generic(NAME segment_vector_vector_expsize_ctor_exceptions_nopmem TRACERS none memcheck )

	build_test_ext(NAME segment_vector_vector_expsize_ctor_exceptions_notx SRC_FILES vector/vector_ctor_exceptions_notx.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_EXPSIZE)
	add_test_generic(NAME segment_vector_vector_expsize_ctor_exceptions_notx TRACERS none memcheck)

	build_test_ext(NAME segment_vector_vector_expsize_ctor_exceptions_oom SRC_FILES vector/vector_ctor_exceptions_oom.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_EXPSIZE)
	add_test_generic(NAME segment_vector_vector_expsize_ctor_exceptions_oom TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_expsize_ctor_move SRC_FILES vector/vector_ctor_move.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_EXPSIZE)
	add_test_generic(NAME segment_vector_vector_expsize_ctor_move TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_expsize_ctor_capacity SRC_FILES vector/vector_ctor_capacity.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_EXPSIZE)
	add_test_generic(NAME segment_vector_vector_expsize_ctor_capacity TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_expsize_dtor SRC_FILES vector/vector_dtor.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_EXPSIZE)
	add_test_generic(NAME segment_vector_vector_expsize_dtor TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_expsize_iterators_access SRC_FILES vector/vector_iterators_access.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_EXPSIZE)
	add_test_generic(NAME segment_vector_vector_expsize_iterators_access TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_expsize_ctor_check_copy SRC_FILES vector/vector_ctor_check_copy.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_EXPSIZE)
	add_test_generic(NAME segment_vector_vector_expsize_ctor_check_copy TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_expsize_modifiers_exceptions_oom SRC_FILES vector/vector_modifiers_exceptions_oom.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_EXPSIZE)
	add_test_generic(NAME segment_vector_vector_expsize_modifiers_exceptions_oom TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_expsize_modifiers_txabort SRC_FILES vector/vector_modifiers_txabort.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_EXPSIZE)
	add_test_generic(NAME segment_vector_vector_expsize_modifiers_txabort TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_expsize_modifiers_type_requirements SRC_FILES vector/vector_modifiers_type_requirements.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_EXPSIZE)
	add_test_generic(NAME segment_vector_vector_expsize_modifiers_type_requirements TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_expsize_std_arg SRC_FILES vector/vector_std_arg.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_EXPSIZE)
	add_test_generic(NAME segment_vector_vector_expsize_std_arg TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_expsize_parameters SRC_FILES vector/vector_parameters.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_EXPSIZE)
	add_test_generic(NAME segment_vector_vector_expsize_parameters TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_expsize_layout SRC_FILES vector/vector_layout.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_EXPSIZE)
	add_test_generic(NAME segment_vector_vector_expsize_layout TRACERS none)
endif()

if(TEST_SEGMENT_VECTOR_VECTOR_FIXEDSIZE)
	build_test_ext(NAME segment_vector_vector_fixedsize_temp_value SRC_FILES temp_value/temp_value.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_FIXEDSIZE)
	add_test_generic(NAME segment_vector_vector_fixedsize_temp_value TRACERS none pmemcheck memcheck)

	build_test_ext(NAME segment_vector_vector_fixedsize_assign_exceptions_length SRC_FILES vector/vector_assign_exceptions_length.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_FIXEDSIZE)
	add_test_generic(NAME segment_vector_vector_fixedsize_assign_exceptions_length TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_fixedsize_assign_exceptions_oom SRC_FILES vector/vector_assign_exceptions_oom.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_FIXEDSIZE_EXT)
	add_test_generic(NAME segment_vector_vector_fixedsize_assign_exceptions_oom TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_fixedsize_assign_txabort SRC_FILES vector/vector_assign_txabort.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_FIXEDSIZE)
	add_test_generic(NAME segment_vector_vector_fixedsize_assign_txabort TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_fixedsize_comp_operators SRC_FILES vector/vector_comp_operators.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_FIXEDSIZE)
	add_test_generic(NAME segment_vector_vector_fixedsize_comp_operators TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_fixedsize_capacity_exceptions_length SRC_FILES vector/vector_capacity_exceptions_length.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_FIXEDSIZE)
	add_test_generic(NAME segment_vector_vector_fixedsize_capacity_exceptions_length TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_fixedsize_capacity_exceptions_oom SRC_FILES vector/vector_capacity_exceptions_oom.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_FIXEDSIZE_EXT)
	add_test_generic(NAME segment_vector_vector_fixedsize_capacity_exceptions_oom TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_fixedsize_capacity_txabort SRC_FILES vector/vector_capacity_txabort.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_FIXEDSIZE)
	add_test_generic(NAME segment_vector_vector_fixedsize_capacity_txabort TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_fixedsize_ctor_exceptions_nopmem SRC_FILES vector/vector_ctor_exceptions_nopmem.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_FIXEDSIZE)
	add_test_generic(NAME segment_vector_vector_fixedsize_ctor_exceptions_nopmem TRACERS none memcheck )

	build_test_ext(NAME segment_vector_vector_fixedsize_ctor_exceptions_notx SRC_FILES vector/vector_ctor_exceptions_notx.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_FIXEDSIZE)
	add_test_generic(NAME segment_vector_vector_fixedsize_ctor_exceptions_notx TRACERS none memcheck)

	build_test_ext(NAME segment_vector_vector_fixedsize_ctor_exceptions_oom SRC_FILES vector/vector_ctor_exceptions_oom.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_FIXEDSIZE)
	add_test_generic(NAME segment_vector_vector_fixedsize_ctor_exceptions_oom TRACERS none memcheck) # XXX: pmemcheck timeouts

	build_test_ext(NAME segment_vector_vector_fixedsize_ctor_move SRC_FILES vector/vector_ctor_move.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_FIXEDSIZE)
	add_test_generic(NAME segment_vector_vector_fixedsize_ctor_move TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_fixedsize_ctor_capacity SRC_FILES vector/vector_ctor_capacity.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_FIXEDSIZE)
	add_test_generic(NAME segment_vector_vector_fixedsize_ctor_capacity TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_fixedsize_dtor SRC_FILES vector/vector_dtor.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_FIXEDSIZE)
	add_test_generic(NAME segment_vector_vector_fixedsize_dtor TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_fixedsize_iterators_access SRC_FILES vector/vector_iterators_access.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_FIXEDSIZE)
	add_test_generic(NAME segment_vector_vector_fixedsize_iterators_access TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_fixedsize_ctor_check_copy SRC_FILES vector/vector_ctor_check_copy.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_FIXEDSIZE)
	add_test_generic(NAME segment_vector_vector_fixedsize_ctor_check_copy TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_fixedsize_modifiers_exceptions_oom SRC_FILES vector/vector_modifiers_exceptions_oom.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_FIXEDSIZE_EXT)
	add_test_generic(NAME segment_vector_vector_fixedsize_modifiers_exceptions_oom TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_fixedsize_modifiers_txabort SRC_FILES vector/vector_modifiers_txabort.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_FIXEDSIZE)
	add_test_generic(NAME segment_vector_vector_fixedsize_modifiers_txabort TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_fixedsize_modifiers_type_requirements SRC_FILES vector/vector_modifiers_type_requirements.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_FIXEDSIZE)
	add_test_generic(NAME segment_vector_vector_fixedsize_modifiers_type_requirements TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_fixedsize_std_arg SRC_FILES vector/vector_std_arg.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_FIXEDSIZE)
	add_test_generic(NAME segment_vector_vector_fixedsize_std_arg TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_fixedsize_parameters SRC_FILES vector/vector_parameters.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_FIXEDSIZE)
	add_test_generic(NAME segment_vector_vector_fixedsize_parameters TRACERS none memcheck pmemcheck)

	build_test_ext(NAME segment_vector_vector_fixedsize_layout SRC_FILES vector/vector_layout.cpp BUILD_OPTIONS -DSEGMENT_VECTOR_VECTOR_FIXEDSIZE)
	add_test_generic(NAME segment_vector_vector_fixedsize_layout TRACERS none)
endif()
################################################################################
########################### ENUMERABLE_THREAD_SPECIFIC #########################
if(TEST_ENUMERABLE_THREAD_SPECIFIC)
	build_test(enumerable_thread_specific_access enumerable_thread_specific/enumerable_thread_specific_access.cpp)
	add_test_generic(NAME enumerable_thread_specific_access CASE 0 TRACERS none memcheck pmemcheck drd helgrind
			SCRIPT concurrent_hash_map/check_is_pmem.cmake)

	build_test(enumerable_thread_specific_size enumerable_thread_specific/enumerable_thread_specific_size.cpp)
	add_test_generic(NAME enumerable_thread_specific_size CASE 0 TRACERS none memcheck pmemcheck drd helgrind
			SCRIPT concurrent_hash_map/check_is_pmem.cmake)

	build_test(enumerable_thread_specific_iterators enumerable_thread_specific/enumerable_thread_specific_iterators.cpp)
	add_test_generic(NAME enumerable_thread_specific_iterators CASE 0 TRACERS none memcheck pmemcheck drd helgrind
			SCRIPT concurrent_hash_map/check_is_pmem.cmake)

	build_test(enumerable_thread_specific_layout enumerable_thread_specific/enumerable_thread_specific_layout.cpp)
	add_test_generic(NAME enumerable_thread_specific_layout TRACERS none)

	build_test(enumerable_thread_specific_initialize enumerable_thread_specific/enumerable_thread_specific_initialize.cpp)
	add_test_generic(NAME enumerable_thread_specific_initialize CASE 0 TRACERS none memcheck pmemcheck
			SCRIPT concurrent_hash_map/check_is_pmem.cmake)

	build_test(enumerable_thread_specific_ctor enumerable_thread_specific/enumerable_thread_specific_ctor.cpp)
	add_test_generic(NAME enumerable_thread_specific_ctor CASE 0 TRACERS none memcheck pmemcheck
			SCRIPT concurrent_hash_map/check_is_pmem.cmake)
endif()
################################################################################
################################## CONCURRENT_MAP ##############################
if(TEST_CONCURRENT_MAP)
	build_test(concurrent_map concurrent_map/concurrent_map.cpp)
	# XXX: Add helgrind tracer for this test when we will fix false-positive with lock order
	add_test_generic(NAME concurrent_map TRACERS none memcheck pmemcheck drd)

	build_test(concurrent_map_singlethread concurrent_map/concurrent_map_singlethread.cpp)
	add_test_generic(NAME concurrent_map_singlethread TRACERS none memcheck pmemcheck)

	build_test(concurrent_map_tx concurrent_map/concurrent_map_tx.cpp)
	add_test_generic(NAME concurrent_map_tx TRACERS none memcheck pmemcheck)

	# XXX: Fix concurrent_map exceptions
	# build_test_ext(NAME concurrent_map_ctor_exceptions_nopmem SRC_FILES map/map_ctor_exception_nopmem.cpp BUILD_OPTIONS -DLIBPMEMOBJ_CPP_TESTS_CONCURRENT_MAP)
	# add_test_generic(NAME concurrent_map_ctor_exceptions_nopmem TRACERS none memcheck pmemcheck)

	build_test_ext(NAME concurrent_map_ctor_exceptions_notx SRC_FILES map/map_ctor_exception_notx.cpp BUILD_OPTIONS -DLIBPMEMOBJ_CPP_TESTS_CONCURRENT_MAP)
	add_test_generic(NAME concurrent_map_ctor_exceptions_notx TRACERS none memcheck)

	build_test_ext(NAME concurrent_map_txabort SRC_FILES map/map_txabort.cpp BUILD_OPTIONS -DLIBPMEMOBJ_CPP_TESTS_CONCURRENT_MAP)
	add_test_generic(NAME concurrent_map_txabort TRACERS none memcheck pmemcheck)

	build_test_ext(NAME concurrent_map_ctor_and_assignment SRC_FILES map/map_ctor_and_assignment.cpp BUILD_OPTIONS -DLIBPMEMOBJ_CPP_TESTS_CONCURRENT_MAP)
	add_test_generic(NAME concurrent_map_ctor_and_assignment TRACERS none memcheck pmemcheck)

	build_test_ext(NAME concurrent_map_find_lower_lower_eq SRC_FILES map/map_find_lower_lower_eq.cpp BUILD_OPTIONS -DLIBPMEMOBJ_CPP_TESTS_CONCURRENT_MAP)
	add_test_generic(NAME concurrent_map_find_lower_lower_eq TRACERS none memcheck pmemcheck)

	if(TESTS_CONCURRENT_GDB AND GDB_FOUND)
		if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
			build_test(concurrent_map_mt_gdb concurrent_map_mt_gdb/concurrent_map_mt_gdb.cpp)
			add_test_generic(NAME concurrent_map_mt_gdb TRACERS none CASE 0 SCRIPT concurrent_map_mt_gdb/concurrent_map_mt_gdb_0.cmake)
			add_test_generic(NAME concurrent_map_mt_gdb TRACERS none CASE 1 SCRIPT concurrent_map_mt_gdb/concurrent_map_mt_gdb_1.cmake)
			add_test_generic(NAME concurrent_map_mt_gdb TRACERS none CASE 2 SCRIPT concurrent_map_mt_gdb/concurrent_map_mt_gdb_2.cmake)
		else()
			message(WARNING "Skipping concurrent_map_mt_gdb test because it is non-debug build")
		endif()
	elseif(TESTS_CONCURRENT_GDB)
		message(WARNING "Skipping concurrent_map_mt_gdb test because GDB was not found")
	endif()

	build_test(concurrent_map_insert_reopen concurrent_map/concurrent_map_insert_reopen.cpp)
	# XXX: Add helgrind tracer for this test when we will fix false-positive with lock order
	# XXX: Add drd tracer after issue https://github.com/pmem/libpmemobj-cpp/issues/770 will be resolved
	add_test_generic(NAME concurrent_map_insert_reopen CASE 0 TRACERS none memcheck pmemcheck
			SCRIPT concurrent_hash_map/check_is_pmem.cmake)

	if(PMREORDER_SUPPORTED)
		build_test(concurrent_map_pmreorder_simple concurrent_map/concurrent_map_pmreorder_simple.cpp)
		add_test_generic(NAME concurrent_map_pmreorder_simple CASE 0 TRACERS none
				SCRIPT cmake/pmreorder.cmake)
		build_test(concurrent_map_pmreorder_erase concurrent_map_pmreorder_erase/concurrent_map_pmreorder_erase.cpp)
		add_test_generic(NAME concurrent_map_pmreorder_erase CASE 0 TRACERS none)

		if(GDB_FOUND)
			set(TEST concurrent_map_pmreorder_break_insert)
			build_test(${TEST} concurrent_map/concurrent_map_pmreorder_simple.cpp)

			# add 5 concurrent_map_pmreorder_break_insert test cases
			set(CURRENT_TEST_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${TEST})
			set(CMAKE_SCRIPT ${CURRENT_TEST_DIR}/${TEST})
			set(GDB_SCRIPT ${CURRENT_TEST_DIR}/break_before_set_next)
			foreach(case RANGE 4)
				math(EXPR IGNORE "${case} + 1")
				math(EXPR PERSIST "${case} + 2")
				configure_file("${GDB_SCRIPT}.gdb.in" "${GDB_SCRIPT}_${PERSIST}.gdb" @ONLY)
				configure_file("${CMAKE_SCRIPT}.cmake.in" "${CMAKE_SCRIPT}_${case}.cmake" @ONLY)
				add_test_generic(NAME ${TEST} CASE ${case} TRACERS none)
			endforeach()
		else()
			message(WARNING "Skipping concurrent_map_pmreorder_break_insert test because GDB was not found")
		endif()
	else()
		message(WARNING "Skipping pmreorder tests because of no pmreorder support")
	endif()
endif()
################################################################################
#################################### RADIX_TREE ################################
if(TEST_RADIX_TREE)
	build_test(radix_tx_abort radix_tree/radix_tx_abort.cpp)
	add_test_generic(NAME radix_tx_abort TRACERS none memcheck pmemcheck)

	build_test(radix_basic radix_tree/radix_basic.cpp)
	add_test_generic(NAME radix_basic TRACERS none memcheck pmemcheck)

	build_test_ext(NAME radix_ctor_exceptions_nopmem SRC_FILES map/map_ctor_exception_nopmem.cpp BUILD_OPTIONS -DLIBPMEMOBJ_CPP_TESTS_RADIX)
	add_test_generic(NAME radix_ctor_exceptions_nopmem TRACERS none memcheck pmemcheck)

	build_test_ext(NAME radix_ctor_exceptions_notx SRC_FILES map/map_ctor_exception_notx.cpp BUILD_OPTIONS -DLIBPMEMOBJ_CPP_TESTS_RADIX)
	add_test_generic(NAME radix_ctor_exceptions_notx TRACERS none memcheck)

	build_test_ext(NAME radix_txabort SRC_FILES map/map_txabort.cpp BUILD_OPTIONS -DLIBPMEMOBJ_CPP_TESTS_RADIX)
	add_test_generic(NAME radix_txabort TRACERS none memcheck pmemcheck)

	build_test_ext(NAME radix_ctor_and_assignment SRC_FILES map/map_ctor_and_assignment.cpp BUILD_OPTIONS -DLIBPMEMOBJ_CPP_TESTS_RADIX)
	add_test_generic(NAME radix_ctor_and_assignment TRACERS none memcheck pmemcheck)

	if(TESTS_LONG)
		build_test(radix_large radix_tree/radix_large.cpp)
		add_test_generic(NAME radix_large TRACERS none)
	endif()
endif()
################################################################################