Add C++ build tests
[urcu.git] / tests / unit / Makefile.am
... / ...
CommitLineData
1AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_srcdir)/tests/utils -I$(top_srcdir)/tests/common
2
3LOG_DRIVER_FLAGS = --merge --comments
4LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
5 $(top_srcdir)/tests/utils/tap-driver.sh
6
7noinst_PROGRAMS = \
8 test_arch \
9 test_arch_cxx \
10 test_uatomic \
11 test_uatomic_cxx \
12 test_urcu_multiflavor \
13 test_urcu_multiflavor_cxx \
14 test_urcu_multiflavor_dynlink \
15 test_urcu_multiflavor_dynlink_cxx \
16 test_urcu_multiflavor_single_unit \
17 test_urcu_multiflavor_single_unit_cxx \
18 test_urcu_multiflavor_single_unit_dynlink \
19 test_urcu_multiflavor_single_unit_dynlink_cxx \
20 test_build \
21 test_build_cxx \
22 test_build_dynlink \
23 test_build_dynlink_cxx
24
25TESTS = $(noinst_PROGRAMS)
26
27noinst_HEADERS = test_urcu_multiflavor.h
28
29URCU_COMMON_LIB=$(top_builddir)/src/liburcu-common.la
30URCU_LIB=$(top_builddir)/src/liburcu.la
31URCU_QSBR_LIB=$(top_builddir)/src/liburcu-qsbr.la
32URCU_MB_LIB=$(top_builddir)/src/liburcu-mb.la
33URCU_SIGNAL_LIB=$(top_builddir)/src/liburcu-signal.la
34URCU_BP_LIB=$(top_builddir)/src/liburcu-bp.la
35URCU_CDS_LIB=$(top_builddir)/src/liburcu-cds.la
36TAP_LIB=$(top_builddir)/tests/utils/libtap.a
37
38test_arch_SOURCES = test_arch.c
39test_arch_LDADD = $(URCU_COMMON_LIB) $(TAP_LIB)
40
41test_arch_cxx_SOURCES = test_arch_cxx.cpp
42test_arch_cxx_LDADD = $(URCU_COMMO_LIB) $(TAP_LIB)
43
44test_uatomic_SOURCES = test_uatomic.c
45test_uatomic_LDADD = $(URCU_COMMON_LIB) $(TAP_LIB)
46
47test_uatomic_cxx_SOURCES = test_uatomic_cxx.cpp
48test_uatomic_cxx_LDADD = $(URCU_COMMON_LIB) $(TAP_LIB)
49
50test_urcu_multiflavor_SOURCES = test_urcu_multiflavor.c \
51 test_urcu_multiflavor-memb.c \
52 test_urcu_multiflavor-mb.c \
53 test_urcu_multiflavor-signal.c \
54 test_urcu_multiflavor-qsbr.c \
55 test_urcu_multiflavor-bp.c
56test_urcu_multiflavor_LDADD = $(URCU_LIB) $(URCU_MB_LIB) \
57 $(URCU_SIGNAL_LIB) $(URCU_QSBR_LIB) $(URCU_BP_LIB) $(TAP_LIB)
58
59test_urcu_multiflavor_cxx_SOURCES = test_urcu_multiflavor_cxx.cpp \
60 test_urcu_multiflavor-memb_cxx.cpp \
61 test_urcu_multiflavor-mb_cxx.cpp \
62 test_urcu_multiflavor-signal_cxx.cpp \
63 test_urcu_multiflavor-qsbr_cxx.cpp \
64 test_urcu_multiflavor-bp_cxx.cpp
65test_urcu_multiflavor_cxx_LDADD = $(URCU_LIB) $(URCU_MB_LIB) \
66 $(URCU_SIGNAL_LIB) $(URCU_QSBR_LIB) $(URCU_BP_LIB) $(TAP_LIB)
67
68test_urcu_multiflavor_dynlink_SOURCES = test_urcu_multiflavor.c \
69 test_urcu_multiflavor-memb.c \
70 test_urcu_multiflavor-mb.c \
71 test_urcu_multiflavor-signal.c \
72 test_urcu_multiflavor-qsbr.c \
73 test_urcu_multiflavor-bp.c
74test_urcu_multiflavor_dynlink_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS)
75test_urcu_multiflavor_dynlink_LDADD = $(URCU_LIB) $(URCU_MB_LIB) \
76 $(URCU_SIGNAL_LIB) $(URCU_QSBR_LIB) $(URCU_BP_LIB) $(TAP_LIB)
77
78test_urcu_multiflavor_dynlink_cxx_SOURCES = test_urcu_multiflavor_cxx.cpp \
79 test_urcu_multiflavor-memb_cxx.cpp \
80 test_urcu_multiflavor-mb_cxx.cpp \
81 test_urcu_multiflavor-signal_cxx.cpp \
82 test_urcu_multiflavor-qsbr_cxx.cpp \
83 test_urcu_multiflavor-bp_cxx.cpp
84test_urcu_multiflavor_dynlink_cxx_CXXFLAGS = -DDYNAMIC_LINK_TEST $(AM_CXXFLAGS)
85test_urcu_multiflavor_dynlink_cxx_LDADD = $(URCU_LIB) $(URCU_MB_LIB) \
86 $(URCU_SIGNAL_LIB) $(URCU_QSBR_LIB) $(URCU_BP_LIB) $(TAP_LIB)
87
88test_urcu_multiflavor_single_unit_SOURCES = test_urcu_multiflavor_single_unit.c
89test_urcu_multiflavor_single_unit_LDADD = $(URCU_LIB) $(URCU_MB_LIB) \
90 $(URCU_SIGNAL_LIB) $(URCU_QSBR_LIB) $(URCU_BP_LIB) $(TAP_LIB)
91
92test_urcu_multiflavor_single_unit_cxx_SOURCES = test_urcu_multiflavor_single_unit_cxx.cpp
93test_urcu_multiflavor_single_unit_cxx_LDADD = $(URCU_LIB) $(URCU_MB_LIB) \
94 $(URCU_SIGNAL_LIB) $(URCU_QSBR_LIB) $(URCU_BP_LIB) $(TAP_LIB)
95
96test_urcu_multiflavor_single_unit_dynlink_SOURCES = test_urcu_multiflavor_single_unit.c
97test_urcu_multiflavor_single_unit_dynlink_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS)
98test_urcu_multiflavor_single_unit_dynlink_LDADD = $(URCU_LIB) $(URCU_MB_LIB) \
99 $(URCU_SIGNAL_LIB) $(URCU_QSBR_LIB) $(URCU_BP_LIB) $(TAP_LIB)
100
101test_urcu_multiflavor_single_unit_dynlink_cxx_SOURCES = test_urcu_multiflavor_single_unit_cxx.cpp
102test_urcu_multiflavor_single_unit_dynlink_cxx_CXXFLAGS = -DDYNAMIC_LINK_TEST $(AM_CXXFLAGS)
103test_urcu_multiflavor_single_unit_dynlink_cxx_LDADD = $(URCU_LIB) $(URCU_MB_LIB) \
104 $(URCU_SIGNAL_LIB) $(URCU_QSBR_LIB) $(URCU_BP_LIB) $(TAP_LIB)
105
106test_build_SOURCES = \
107 test_build.c
108test_build_LDADD = $(URCU_COMMON_LIB) $(TAP_LIB)
109
110test_build_cxx_SOURCES = \
111 test_build_cxx.cpp
112test_build_cxx_LDADD = $(URCU_COMMON_LIB) $(TAP_LIB)
113
114test_build_dynlink_SOURCES = \
115 test_build.c
116test_build_dynlink_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS)
117test_build_dynlink_LDADD = $(URCU_COMMON_LIB) $(TAP_LIB)
118
119test_build_dynlink_cxx_SOURCES = \
120 test_build_cxx.cpp
121test_build_dynlink_cxx_CXXFLAGS = -DDYNAMIC_LINK_TEST $(AM_CXXFLAGS)
122test_build_dynlink_cxx_LDADD = $(URCU_COMMON_LIB) $(TAP_LIB)
123
124all-local:
125 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
126 for script in $(SCRIPT_LIST); do \
127 cp -f $(srcdir)/$$script $(builddir); \
128 done; \
129 fi
130
131clean-local:
132 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
133 for script in $(SCRIPT_LIST); do \
134 rm -f $(builddir)/$$script; \
135 done; \
136 fi
137
This page took 0.023753 seconds and 4 git commands to generate.