blob: c6e8707502db368d0978fd4a272106c8289e85c9 [file] [log] [blame]
shiqiand2014562008-07-03 22:38:12 +00001# Automake file
2
3# Nonstandard package files for distribution
4EXTRA_DIST = \
5 CHANGES \
6 CONTRIBUTORS \
7 scripts/gen_gtest_pred_impl.py
8
shiqiane0ecb7a2008-07-09 20:58:26 +00009# MSVC project files
10EXTRA_DIST += \
11 msvc/gtest.sln \
12 msvc/gtest.vcproj \
13 msvc/gtest_color_test_.vcproj \
14 msvc/gtest_env_var_test_.vcproj \
15 msvc/gtest_environment_test.vcproj \
16 msvc/gtest_main.vcproj \
17 msvc/gtest_output_test_.vcproj \
18 msvc/gtest_prod_test.vcproj \
19 msvc/gtest_uninitialized_test_.vcproj \
20 msvc/gtest_unittest.vcproj
21
shiqiand2014562008-07-03 22:38:12 +000022# TODO(wan@google.com): integrate scripts/gen_gtest_pred_impl.py into
23# the build system such that a user can specify the maximum predicate
24# arity here and have the script automatically generate the
25# corresponding .h and .cc files.
26
27# Scripts and utilities
28bin_SCRIPTS = scripts/gtest-config
29CLEANFILES = $(bin_SCRIPTS)
30
31# Distribute and install M4 macro
32m4datadir = $(datadir)/aclocal
33m4data_DATA = m4/gtest.m4
34EXTRA_DIST += $(m4data_DATA)
35
36# We define the global AM_CPPFLAGS as everything we compile includes from these
37# directories.
38AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/include
39
40# Build rules for libraries.
41lib_LTLIBRARIES = lib/libgtest.la lib/libgtest_main.la
42
43lib_libgtest_la_SOURCES = src/gtest.cc \
44 src/gtest-death-test.cc \
45 src/gtest-filepath.cc \
46 src/gtest-internal-inl.h \
47 src/gtest-port.cc
48
49pkginclude_HEADERS = include/gtest/gtest.h \
50 include/gtest/gtest-death-test.h \
51 include/gtest/gtest-message.h \
52 include/gtest/gtest-spi.h \
53 include/gtest/gtest_pred_impl.h \
54 include/gtest/gtest_prod.h
55
56pkginclude_internaldir = $(pkgincludedir)/internal
57pkginclude_internal_HEADERS = \
58 include/gtest/internal/gtest-death-test-internal.h \
59 include/gtest/internal/gtest-filepath.h \
60 include/gtest/internal/gtest-internal.h \
61 include/gtest/internal/gtest-port.h \
62 include/gtest/internal/gtest-string.h
63
64lib_libgtest_main_la_SOURCES = src/gtest_main.cc
65lib_libgtest_main_la_LIBADD = lib/libgtest.la
66
67# Bulid rules for samples and tests. Automake's naming for some of
68# these variables isn't terribly obvious, so this is a brief
69# reference:
70#
71# TESTS -- Programs run automatically by "make check"
72# check_PROGRAMS -- Programs built by "make check" but not necessarily run
73
74noinst_LTLIBRARIES = samples/libsamples.la
75
76samples_libsamples_la_SOURCES = samples/sample1.cc \
77 samples/sample1.h \
78 samples/sample2.cc \
79 samples/sample2.h \
80 samples/sample3-inl.h \
81 samples/sample4.cc \
82 samples/sample4.h
83
84TESTS=
85TESTS_ENVIRONMENT = GTEST_SOURCE_DIR="$(srcdir)/test" \
86 GTEST_BUILD_DIR="$(top_builddir)/test"
87check_PROGRAMS=
88
89TESTS += samples/sample1_unittest
90check_PROGRAMS += samples/sample1_unittest
91samples_sample1_unittest_SOURCES = samples/sample1_unittest.cc
92samples_sample1_unittest_LDADD = lib/libgtest_main.la \
93 samples/libsamples.la
94
95TESTS += samples/sample2_unittest
96check_PROGRAMS += samples/sample2_unittest
97samples_sample2_unittest_SOURCES = samples/sample2_unittest.cc
98samples_sample2_unittest_LDADD = lib/libgtest_main.la \
99 samples/libsamples.la
100
101TESTS += samples/sample3_unittest
102check_PROGRAMS += samples/sample3_unittest
103samples_sample3_unittest_SOURCES = samples/sample3_unittest.cc
104samples_sample3_unittest_LDADD = lib/libgtest_main.la \
105 samples/libsamples.la
106
107TESTS += samples/sample4_unittest
108check_PROGRAMS += samples/sample4_unittest
109samples_sample4_unittest_SOURCES = samples/sample4_unittest.cc
110samples_sample4_unittest_LDADD = lib/libgtest_main.la \
111 samples/libsamples.la
112
113TESTS += samples/sample5_unittest
114check_PROGRAMS += samples/sample5_unittest
115samples_sample5_unittest_SOURCES = samples/sample5_unittest.cc
116samples_sample5_unittest_LDADD = lib/libgtest_main.la \
117 samples/libsamples.la
118
119TESTS += test/gtest_unittest
120check_PROGRAMS += test/gtest_unittest
121test_gtest_unittest_SOURCES = test/gtest_unittest.cc
122test_gtest_unittest_LDADD = lib/libgtest.la
123
124TESTS += test/gtest-death-test_test
125check_PROGRAMS += test/gtest-death-test_test
126test_gtest_death_test_test_SOURCES = test/gtest-death-test_test.cc
127test_gtest_death_test_test_CXXFLAGS = $(AM_CXXFLAGS) -pthread
128test_gtest_death_test_test_LDADD = -lpthread lib/libgtest_main.la
129
130TESTS += test/gtest-filepath_test
131check_PROGRAMS += test/gtest-filepath_test
132test_gtest_filepath_test_SOURCES = test/gtest-filepath_test.cc
133test_gtest_filepath_test_LDADD = lib/libgtest_main.la
134
135TESTS += test/gtest-message_test
136check_PROGRAMS += test/gtest-message_test
137test_gtest_message_test_SOURCES = test/gtest-message_test.cc
138test_gtest_message_test_LDADD = lib/libgtest_main.la
139
140TESTS += test/gtest-options_test
141check_PROGRAMS += test/gtest-options_test
142test_gtest_options_test_SOURCES = test/gtest-options_test.cc
143test_gtest_options_test_LDADD = lib/libgtest_main.la
144
145TESTS += test/gtest_pred_impl_unittest
146check_PROGRAMS += test/gtest_pred_impl_unittest
147test_gtest_pred_impl_unittest_SOURCES = test/gtest_pred_impl_unittest.cc
148test_gtest_pred_impl_unittest_LDADD = lib/libgtest_main.la
149
150TESTS += test/gtest_environment_test
151check_PROGRAMS += test/gtest_environment_test
152test_gtest_environment_test_SOURCES = test/gtest_environment_test.cc
153test_gtest_environment_test_LDADD = lib/libgtest.la
154
155TESTS += test/gtest_no_test_unittest
156check_PROGRAMS += test/gtest_no_test_unittest
157test_gtest_no_test_unittest_SOURCES = test/gtest_no_test_unittest.cc
158test_gtest_no_test_unittest_LDADD = lib/libgtest.la
159
160TESTS += test/gtest_main_unittest
161check_PROGRAMS += test/gtest_main_unittest
162test_gtest_main_unittest_SOURCES = test/gtest_main_unittest.cc
163test_gtest_main_unittest_LDADD = lib/libgtest_main.la
164
165TESTS += test/gtest_prod_test
166check_PROGRAMS += test/gtest_prod_test
167test_gtest_prod_test_SOURCES = test/gtest_prod_test.cc \
168 test/production.cc \
169 test/production.h
170test_gtest_prod_test_LDADD = lib/libgtest_main.la
171
172TESTS += test/gtest_repeat_test
173check_PROGRAMS += test/gtest_repeat_test
174test_gtest_repeat_test_SOURCES = test/gtest_repeat_test.cc
175test_gtest_repeat_test_LDADD = lib/libgtest.la
176
177TESTS += test/gtest_stress_test
178check_PROGRAMS += test/gtest_stress_test
179test_gtest_stress_test_SOURCES = test/gtest_stress_test.cc
180test_gtest_stress_test_LDADD = lib/libgtest.la
181
182# The following tests depend on the presence of a Python installation and are
183# keyed off of it. TODO(chandlerc@google.com): While we currently only attempt
184# to build and execute these tests if Autoconf has found Python v2.4 on the
185# system, we don't use the PYTHON variable it specified as the valid
186# interpreter. The problem is that TESTS_ENVIRONMENT is a global variable, and
187# thus we cannot distinguish between C++ unit tests and Python unit tests.
188if HAVE_PYTHON
189check_SCRIPTS =
190
191# These two Python modules are used by multiple Pythong tests below.
192check_SCRIPTS += test/gtest_test_utils.py \
193 test/gtest_xml_test_utils.py
194
195check_PROGRAMS += test/gtest_output_test_
196test_gtest_output_test__SOURCES = test/gtest_output_test_.cc
197test_gtest_output_test__LDADD = lib/libgtest.la
198check_SCRIPTS += test/gtest_output_test.py
199EXTRA_DIST += test/gtest_output_test_golden_lin.txt \
200 test/gtest_output_test_golden_win.txt
201TESTS += test/gtest_output_test.py
202
203check_PROGRAMS += test/gtest_color_test_
204test_gtest_color_test__SOURCES = test/gtest_color_test_.cc
205test_gtest_color_test__LDADD = lib/libgtest.la
206check_SCRIPTS += test/gtest_color_test.py
207TESTS += test/gtest_color_test.py
208
209check_PROGRAMS += test/gtest_env_var_test_
210test_gtest_env_var_test__SOURCES = test/gtest_env_var_test_.cc
211test_gtest_env_var_test__LDADD = lib/libgtest.la
212check_SCRIPTS += test/gtest_env_var_test.py
213TESTS += test/gtest_env_var_test.py
214
215check_PROGRAMS += test/gtest_filter_unittest_
216test_gtest_filter_unittest__SOURCES = test/gtest_filter_unittest_.cc
217test_gtest_filter_unittest__LDADD = lib/libgtest.la
218check_SCRIPTS += test/gtest_filter_unittest.py
219TESTS += test/gtest_filter_unittest.py
220
221check_PROGRAMS += test/gtest_break_on_failure_unittest_
222test_gtest_break_on_failure_unittest__SOURCES = \
223 test/gtest_break_on_failure_unittest_.cc
224test_gtest_break_on_failure_unittest__LDADD = lib/libgtest.la
225check_SCRIPTS += test/gtest_break_on_failure_unittest.py
226TESTS += test/gtest_break_on_failure_unittest.py
227
228check_PROGRAMS += test/gtest_list_tests_unittest_
229test_gtest_list_tests_unittest__SOURCES = test/gtest_list_tests_unittest_.cc
230test_gtest_list_tests_unittest__LDADD = lib/libgtest.la
231check_SCRIPTS += test/gtest_list_tests_unittest.py
232TESTS += test/gtest_list_tests_unittest.py
233
234check_PROGRAMS += test/gtest_xml_output_unittest_
235test_gtest_xml_output_unittest__SOURCES = test/gtest_xml_output_unittest_.cc
236test_gtest_xml_output_unittest__LDADD = lib/libgtest_main.la
237check_SCRIPTS += test/gtest_xml_output_unittest.py
238TESTS += test/gtest_xml_output_unittest.py
239
240check_PROGRAMS += test/gtest_xml_outfile1_test_
241test_gtest_xml_outfile1_test__SOURCES = test/gtest_xml_outfile1_test_.cc
242test_gtest_xml_outfile1_test__LDADD = lib/libgtest_main.la
243check_PROGRAMS += test/gtest_xml_outfile2_test_
244test_gtest_xml_outfile2_test__SOURCES = test/gtest_xml_outfile2_test_.cc
245test_gtest_xml_outfile2_test__LDADD = lib/libgtest_main.la
246check_SCRIPTS += test/gtest_xml_outfiles_test.py
247TESTS += test/gtest_xml_outfiles_test.py
248
249check_PROGRAMS += test/gtest_uninitialized_test_
250test_gtest_uninitialized_test__SOURCES = test/gtest_uninitialized_test_.cc
251test_gtest_uninitialized_test__LDADD = lib/libgtest.la
252check_SCRIPTS += test/gtest_uninitialized_test.py
253TESTS += test/gtest_uninitialized_test.py
254
255# TODO(wan@google.com): make the build script compile and run the
256# negative-compilation tests. (The test/gtest_nc* files are unfinished
257# implementation of tests for verifying that certain kinds of misuse
258# of Google Test don't compile.)
259EXTRA_DIST += $(check_SCRIPTS) \
260 test/gtest_nc.cc \
261 test/gtest_nc_test.py
262
263endif