Makefile.am 16.9 KB
Newer Older
shiqian's avatar
shiqian committed
1
2
# Automake file

3
4
# TODO(chandlerc@google.com): automate the generation of *.h from *.h.pump.

shiqian's avatar
shiqian committed
5
6
7
8
# Nonstandard package files for distribution
EXTRA_DIST = \
  CHANGES \
  CONTRIBUTORS \
9
  include/gtest/gtest-param-test.h.pump \
10
  include/gtest/internal/gtest-tuple.h.pump \
11
  include/gtest/internal/gtest-type-util.h.pump \
12
  include/gtest/internal/gtest-param-util-generated.h.pump \
13
  make/Makefile \
14
  scons/SConscript \
15
16
  scons/SConstruct \
  scons/SConstruct.common \
17
  scripts/fuse_gtest_files.py \
shiqian's avatar
shiqian committed
18
  scripts/gen_gtest_pred_impl.py \
19
  scripts/test/Makefile \
20
  test/gtest_all_test.cc
shiqian's avatar
shiqian committed
21

22
23
24
25
26
27
28
# MSVC project files
EXTRA_DIST += \
  msvc/gtest.sln \
  msvc/gtest.vcproj \
  msvc/gtest_color_test_.vcproj \
  msvc/gtest_env_var_test_.vcproj \
  msvc/gtest_environment_test.vcproj \
29
  msvc/gtest_main-md.vcproj \
30
  msvc/gtest_main.vcproj \
31
32
  msvc/gtest-md.sln \
  msvc/gtest-md.vcproj \
33
  msvc/gtest_output_test_.vcproj \
34
  msvc/gtest_prod_test-md.vcproj \
35
36
  msvc/gtest_prod_test.vcproj \
  msvc/gtest_uninitialized_test_.vcproj \
37
  msvc/gtest_unittest-md.vcproj \
38
39
  msvc/gtest_unittest.vcproj

40
41
42
43
44
45
# xcode project files
EXTRA_DIST += \
  xcode/Config/DebugProject.xcconfig \
  xcode/Config/FrameworkTarget.xcconfig \
  xcode/Config/General.xcconfig \
  xcode/Config/ReleaseProject.xcconfig \
46
  xcode/Config/StaticLibraryTarget.xcconfig \
47
  xcode/Config/TestTarget.xcconfig \
48
49
  xcode/Resources/Info.plist \
  xcode/Scripts/versiongenerate.py \
50
  xcode/Scripts/runtests.sh \
51
52
53
54
55
56
57
58
59
60
  xcode/gtest.xcodeproj/project.pbxproj

# xcode sample files
EXTRA_DIST += \
  xcode/Samples/FrameworkSample/Info.plist \
  xcode/Samples/FrameworkSample/widget_test.cc \
  xcode/Samples/FrameworkSample/widget.cc \
  xcode/Samples/FrameworkSample/widget.h \
  xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj

61
62
63
64
65
66
67
68
69
# C++Builder project files
EXTRA_DIST += \
  codegear/gtest_all.cc \
  codegear/gtest_link.cc \
  codegear/gtest.cbproj \
  codegear/gtest_main.cbproj \
  codegear/gtest_unittest.cbproj \
  codegear/gtest.groupproj

shiqian's avatar
shiqian committed
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
# TODO(wan@google.com): integrate scripts/gen_gtest_pred_impl.py into
#   the build system such that a user can specify the maximum predicate
#   arity here and have the script automatically generate the
#   corresponding .h and .cc files.

# Scripts and utilities
bin_SCRIPTS = scripts/gtest-config
CLEANFILES = $(bin_SCRIPTS)

# Distribute and install M4 macro
m4datadir = $(datadir)/aclocal
m4data_DATA = m4/gtest.m4
EXTRA_DIST += $(m4data_DATA)

# We define the global AM_CPPFLAGS as everything we compile includes from these
# directories.
AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/include

# Build rules for libraries.
lib_LTLIBRARIES = lib/libgtest.la lib/libgtest_main.la

lib_libgtest_la_SOURCES = src/gtest.cc \
                          src/gtest-death-test.cc \
                          src/gtest-filepath.cc \
                          src/gtest-internal-inl.h \
95
                          src/gtest-port.cc \
shiqian's avatar
shiqian committed
96
                          src/gtest-test-part.cc \
97
                          src/gtest-typed-test.cc
shiqian's avatar
shiqian committed
98
99
100
101

pkginclude_HEADERS = include/gtest/gtest.h \
                     include/gtest/gtest-death-test.h \
                     include/gtest/gtest-message.h \
102
                     include/gtest/gtest-param-test.h \
shiqian's avatar
shiqian committed
103
                     include/gtest/gtest_pred_impl.h \
104
                     include/gtest/gtest_prod.h \
105
                     include/gtest/gtest-spi.h \
shiqian's avatar
shiqian committed
106
                     include/gtest/gtest-test-part.h \
107
                     include/gtest/gtest-typed-test.h
shiqian's avatar
shiqian committed
108
109
110
111
112
113

pkginclude_internaldir = $(pkgincludedir)/internal
pkginclude_internal_HEADERS = \
  include/gtest/internal/gtest-death-test-internal.h \
  include/gtest/internal/gtest-filepath.h \
  include/gtest/internal/gtest-internal.h \
114
115
116
  include/gtest/internal/gtest-linked_ptr.h \
  include/gtest/internal/gtest-param-util-generated.h \
  include/gtest/internal/gtest-param-util.h \
shiqian's avatar
shiqian committed
117
  include/gtest/internal/gtest-port.h \
118
  include/gtest/internal/gtest-string.h \
119
  include/gtest/internal/gtest-tuple.h \
120
  include/gtest/internal/gtest-type-util.h
shiqian's avatar
shiqian committed
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

lib_libgtest_main_la_SOURCES = src/gtest_main.cc
lib_libgtest_main_la_LIBADD = lib/libgtest.la

# Bulid rules for samples and tests. Automake's naming for some of
# these variables isn't terribly obvious, so this is a brief
# reference:
#
# TESTS -- Programs run automatically by "make check"
# check_PROGRAMS -- Programs built by "make check" but not necessarily run

noinst_LTLIBRARIES = samples/libsamples.la

samples_libsamples_la_SOURCES = samples/sample1.cc \
                                samples/sample1.h \
                                samples/sample2.cc \
                                samples/sample2.h \
                                samples/sample3-inl.h \
                                samples/sample4.cc \
                                samples/sample4.h

TESTS=
TESTS_ENVIRONMENT = GTEST_SOURCE_DIR="$(srcdir)/test" \
                    GTEST_BUILD_DIR="$(top_builddir)/test"
check_PROGRAMS=

TESTS += samples/sample1_unittest
check_PROGRAMS += samples/sample1_unittest
samples_sample1_unittest_SOURCES = samples/sample1_unittest.cc
samples_sample1_unittest_LDADD = lib/libgtest_main.la \
                                 samples/libsamples.la

TESTS += samples/sample2_unittest
check_PROGRAMS += samples/sample2_unittest
samples_sample2_unittest_SOURCES = samples/sample2_unittest.cc
samples_sample2_unittest_LDADD = lib/libgtest_main.la \
                                 samples/libsamples.la

TESTS += samples/sample3_unittest
check_PROGRAMS += samples/sample3_unittest
samples_sample3_unittest_SOURCES = samples/sample3_unittest.cc
samples_sample3_unittest_LDADD = lib/libgtest_main.la \
                                 samples/libsamples.la

TESTS += samples/sample4_unittest
check_PROGRAMS += samples/sample4_unittest
samples_sample4_unittest_SOURCES = samples/sample4_unittest.cc
samples_sample4_unittest_LDADD = lib/libgtest_main.la \
                                 samples/libsamples.la

TESTS += samples/sample5_unittest
check_PROGRAMS += samples/sample5_unittest
samples_sample5_unittest_SOURCES = samples/sample5_unittest.cc
samples_sample5_unittest_LDADD = lib/libgtest_main.la \
                                 samples/libsamples.la

177
178
TESTS += samples/sample6_unittest
check_PROGRAMS += samples/sample6_unittest
179
180
samples_sample6_unittest_SOURCES = samples/prime_tables.h \
                                   samples/sample6_unittest.cc
181
182
183
samples_sample6_unittest_LDADD = lib/libgtest_main.la \
                                 samples/libsamples.la

184
185
186
187
188
189
190
191
192
193
194
195
196
197
TESTS += samples/sample7_unittest
check_PROGRAMS += samples/sample7_unittest
samples_sample7_unittest_SOURCES = samples/prime_tables.h \
                                   samples/sample7_unittest.cc
samples_sample7_unittest_LDADD = lib/libgtest_main.la \
                                 samples/libsamples.la

TESTS += samples/sample8_unittest
check_PROGRAMS += samples/sample8_unittest
samples_sample8_unittest_SOURCES = samples/prime_tables.h \
                                   samples/sample8_unittest.cc
samples_sample8_unittest_LDADD = lib/libgtest_main.la \
                                 samples/libsamples.la

shiqian's avatar
shiqian committed
198
199
200
TESTS += test/gtest-death-test_test
check_PROGRAMS += test/gtest-death-test_test
test_gtest_death_test_test_SOURCES = test/gtest-death-test_test.cc
201
202
203
test_gtest_death_test_test_CXXFLAGS = $(AM_CXXFLAGS) $(PTHREAD_CFLAGS)
test_gtest_death_test_test_LDADD = $(PTHREAD_LIBS) $(PTHREAD_CFLAGS) \
                                   lib/libgtest_main.la
shiqian's avatar
shiqian committed
204
205
206
207
208
209

TESTS += test/gtest_environment_test
check_PROGRAMS += test/gtest_environment_test
test_gtest_environment_test_SOURCES = test/gtest_environment_test.cc
test_gtest_environment_test_LDADD = lib/libgtest.la

210
211
212
213
214
TESTS += test/gtest-filepath_test
check_PROGRAMS += test/gtest-filepath_test
test_gtest_filepath_test_SOURCES = test/gtest-filepath_test.cc
test_gtest_filepath_test_LDADD = lib/libgtest_main.la

215
216
217
218
219
TESTS += test/gtest-linked_ptr_test
check_PROGRAMS += test/gtest-linked_ptr_test
test_gtest_linked_ptr_test_SOURCES = test/gtest-linked_ptr_test.cc
test_gtest_linked_ptr_test_LDADD = lib/libgtest_main.la

220
221
222
223
224
225
226
227
228
229
TESTS += test/gtest_main_unittest
check_PROGRAMS += test/gtest_main_unittest
test_gtest_main_unittest_SOURCES = test/gtest_main_unittest.cc
test_gtest_main_unittest_LDADD = lib/libgtest_main.la

TESTS += test/gtest-message_test
check_PROGRAMS += test/gtest-message_test
test_gtest_message_test_SOURCES = test/gtest-message_test.cc
test_gtest_message_test_LDADD = lib/libgtest_main.la

shiqian's avatar
shiqian committed
230
231
232
233
234
TESTS += test/gtest_no_test_unittest
check_PROGRAMS += test/gtest_no_test_unittest
test_gtest_no_test_unittest_SOURCES = test/gtest_no_test_unittest.cc
test_gtest_no_test_unittest_LDADD = lib/libgtest.la

235
236
237
238
TESTS += test/gtest-options_test
check_PROGRAMS += test/gtest-options_test
test_gtest_options_test_SOURCES = test/gtest-options_test.cc
test_gtest_options_test_LDADD = lib/libgtest_main.la
shiqian's avatar
shiqian committed
239

240
241
242
243
244
245
246
247
248
249
250
251
TESTS += test/gtest-param-test_test
check_PROGRAMS += test/gtest-param-test_test
test_gtest_param_test_test_SOURCES = test/gtest-param-test_test.cc \
                                     test/gtest-param-test2_test.cc \
                                     test/gtest-param-test_test.h
test_gtest_param_test_test_LDADD = lib/libgtest.la

TESTS += test/gtest-port_test
check_PROGRAMS += test/gtest-port_test
test_gtest_port_test_SOURCES = test/gtest-port_test.cc
test_gtest_port_test_LDADD = lib/libgtest_main.la

252
253
254
255
256
TESTS += test/gtest_pred_impl_unittest
check_PROGRAMS += test/gtest_pred_impl_unittest
test_gtest_pred_impl_unittest_SOURCES = test/gtest_pred_impl_unittest.cc
test_gtest_pred_impl_unittest_LDADD = lib/libgtest_main.la

shiqian's avatar
shiqian committed
257
258
259
260
261
262
263
264
265
266
267
268
TESTS += test/gtest_prod_test
check_PROGRAMS += test/gtest_prod_test
test_gtest_prod_test_SOURCES = test/gtest_prod_test.cc \
                               test/production.cc \
                               test/production.h
test_gtest_prod_test_LDADD = lib/libgtest_main.la

TESTS += test/gtest_repeat_test
check_PROGRAMS += test/gtest_repeat_test
test_gtest_repeat_test_SOURCES = test/gtest_repeat_test.cc
test_gtest_repeat_test_LDADD = lib/libgtest.la

shiqian's avatar
shiqian committed
269
270
271
272
273
TESTS += test/gtest_sole_header_test
check_PROGRAMS += test/gtest_sole_header_test
test_gtest_sole_header_test_SOURCES = test/gtest_sole_header_test.cc
test_gtest_sole_header_test_LDADD = lib/libgtest_main.la

shiqian's avatar
shiqian committed
274
275
276
277
278
TESTS += test/gtest_stress_test
check_PROGRAMS += test/gtest_stress_test
test_gtest_stress_test_SOURCES = test/gtest_stress_test.cc
test_gtest_stress_test_LDADD = lib/libgtest.la

shiqian's avatar
shiqian committed
279
280
281
282
283
TESTS += test/gtest-test-part_test
check_PROGRAMS += test/gtest-test-part_test
test_gtest_test_part_test_SOURCES = test/gtest-test-part_test.cc
test_gtest_test_part_test_LDADD = lib/libgtest_main.la

284
285
286
287
288
289
290
TESTS += test/gtest_throw_on_failure_ex_test
check_PROGRAMS += test/gtest_throw_on_failure_ex_test
test_gtest_throw_on_failure_ex_test_SOURCES = \
    test/gtest_throw_on_failure_ex_test.cc \
    src/gtest-all.cc
test_gtest_throw_on_failure_ex_test_CXXFLAGS = $(AM_CXXFLAGS) -fexceptions

291
292
293
294
295
296
297
TESTS += test/gtest-typed-test_test
check_PROGRAMS += test/gtest-typed-test_test
test_gtest_typed_test_test_SOURCES = test/gtest-typed-test_test.cc \
                                     test/gtest-typed-test2_test.cc \
                                     test/gtest-typed-test_test.h
test_gtest_typed_test_test_LDADD = lib/libgtest_main.la

298
299
300
TESTS += test/gtest_unittest
check_PROGRAMS += test/gtest_unittest
test_gtest_unittest_SOURCES = test/gtest_unittest.cc
301
test_gtest_unittest_LDADD = lib/libgtest_main.la
302

303
304
305
306
307
TESTS += test/gtest-unittest-api_test
check_PROGRAMS += test/gtest-unittest-api_test
test_gtest_unittest_api_test_SOURCES = test/gtest-unittest-api_test.cc
test_gtest_unittest_api_test_LDADD = lib/libgtest_main.la

308
309
310
311
312
TESTS += test/gtest-listener_test
check_PROGRAMS += test/gtest-listener_test
test_gtest_listener_test_SOURCES = test/gtest-listener_test.cc
test_gtest_listener_test_LDADD = lib/libgtest_main.la

313
314
315
316
317
318
319
320
# Verifies that Google Test works when RTTI is disabled.
TESTS += test/gtest_no_rtti_test
check_PROGRAMS += test/gtest_no_rtti_test
test_gtest_no_rtti_test_SOURCES = test/gtest_unittest.cc \
                                  src/gtest-all.cc \
                                  src/gtest_main.cc
test_gtest_no_rtti_test_CXXFLAGS = $(AM_CXXFLAGS) -fno-rtti -DGTEST_HAS_RTTI=0

321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
# Verifies that Google Test's own TR1 tuple implementation works.
TESTS += test/gtest-tuple_test
check_PROGRAMS += test/gtest-tuple_test
test_gtest_tuple_test_SOURCES = test/gtest-tuple_test.cc \
                                src/gtest-all.cc \
                                src/gtest_main.cc
test_gtest_tuple_test_CXXFLAGS = $(AM_CXXFLAGS) -DGTEST_USE_OWN_TR1_TUPLE=1

# Verifies that Google Test's features that use its own TR1 tuple work.
TESTS += test/gtest_use_own_tuple_test
check_PROGRAMS += test/gtest_use_own_tuple_test
test_gtest_use_own_tuple_test_SOURCES = test/gtest-param-test_test.cc \
                                        test/gtest-param-test2_test.cc \
                                        src/gtest-all.cc
test_gtest_use_own_tuple_test_CXXFLAGS = \
    $(AM_CXXFLAGS) -DGTEST_USE_OWN_TR1_TUPLE=1

shiqian's avatar
shiqian committed
338
339
340
341
342
343
344
345
346
# The following tests depend on the presence of a Python installation and are
# keyed off of it. TODO(chandlerc@google.com): While we currently only attempt
# to build and execute these tests if Autoconf has found Python v2.4 on the
# system, we don't use the PYTHON variable it specified as the valid
# interpreter. The problem is that TESTS_ENVIRONMENT is a global variable, and
# thus we cannot distinguish between C++ unit tests and Python unit tests.
if HAVE_PYTHON
check_SCRIPTS =

347
# These two Python modules are used by multiple Python tests below.
shiqian's avatar
shiqian committed
348
349
350
check_SCRIPTS += test/gtest_test_utils.py \
                 test/gtest_xml_test_utils.py

351
352
353
354
355
356
check_PROGRAMS += test/gtest_break_on_failure_unittest_
test_gtest_break_on_failure_unittest__SOURCES = \
  test/gtest_break_on_failure_unittest_.cc
test_gtest_break_on_failure_unittest__LDADD = lib/libgtest.la
check_SCRIPTS += test/gtest_break_on_failure_unittest.py
TESTS += test/gtest_break_on_failure_unittest.py
shiqian's avatar
shiqian committed
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375

check_PROGRAMS += test/gtest_color_test_
test_gtest_color_test__SOURCES = test/gtest_color_test_.cc
test_gtest_color_test__LDADD = lib/libgtest.la
check_SCRIPTS += test/gtest_color_test.py
TESTS += test/gtest_color_test.py

check_PROGRAMS += test/gtest_env_var_test_
test_gtest_env_var_test__SOURCES = test/gtest_env_var_test_.cc
test_gtest_env_var_test__LDADD = lib/libgtest.la
check_SCRIPTS += test/gtest_env_var_test.py
TESTS += test/gtest_env_var_test.py

check_PROGRAMS += test/gtest_filter_unittest_
test_gtest_filter_unittest__SOURCES = test/gtest_filter_unittest_.cc
test_gtest_filter_unittest__LDADD = lib/libgtest.la
check_SCRIPTS += test/gtest_filter_unittest.py
TESTS += test/gtest_filter_unittest.py

376
377
378
379
380
381
check_PROGRAMS += test/gtest_help_test_
test_gtest_help_test__SOURCES = test/gtest_help_test_.cc
test_gtest_help_test__LDADD = lib/libgtest_main.la
check_SCRIPTS += test/gtest_help_test.py
TESTS += test/gtest_help_test.py

shiqian's avatar
shiqian committed
382
383
384
385
386
387
check_PROGRAMS += test/gtest_list_tests_unittest_
test_gtest_list_tests_unittest__SOURCES = test/gtest_list_tests_unittest_.cc
test_gtest_list_tests_unittest__LDADD = lib/libgtest.la
check_SCRIPTS += test/gtest_list_tests_unittest.py
TESTS += test/gtest_list_tests_unittest.py

388
389
390
391
392
393
394
395
check_PROGRAMS += test/gtest_output_test_
test_gtest_output_test__SOURCES = test/gtest_output_test_.cc
test_gtest_output_test__LDADD = lib/libgtest.la
check_SCRIPTS += test/gtest_output_test.py
EXTRA_DIST += test/gtest_output_test_golden_lin.txt \
              test/gtest_output_test_golden_win.txt
TESTS += test/gtest_output_test.py

396
397
398
399
400
401
402
403
check_PROGRAMS += test/gtest_throw_on_failure_test_
test_gtest_throw_on_failure_test__SOURCES = \
  test/gtest_throw_on_failure_test_.cc \
  src/gtest-all.cc
test_gtest_throw_on_failure_test__CXXFLAGS = $(AM_CXXFLAGS) -fno-exceptions
check_SCRIPTS += test/gtest_throw_on_failure_test.py
TESTS += test/gtest_throw_on_failure_test.py

404
405
406
407
408
check_PROGRAMS += test/gtest_uninitialized_test_
test_gtest_uninitialized_test__SOURCES = test/gtest_uninitialized_test_.cc
test_gtest_uninitialized_test__LDADD = lib/libgtest.la
check_SCRIPTS += test/gtest_uninitialized_test.py
TESTS += test/gtest_uninitialized_test.py
shiqian's avatar
shiqian committed
409
410
411
412
413
414
415
416
417
418

check_PROGRAMS += test/gtest_xml_outfile1_test_
test_gtest_xml_outfile1_test__SOURCES = test/gtest_xml_outfile1_test_.cc
test_gtest_xml_outfile1_test__LDADD = lib/libgtest_main.la
check_PROGRAMS += test/gtest_xml_outfile2_test_
test_gtest_xml_outfile2_test__SOURCES = test/gtest_xml_outfile2_test_.cc
test_gtest_xml_outfile2_test__LDADD = lib/libgtest_main.la
check_SCRIPTS += test/gtest_xml_outfiles_test.py
TESTS += test/gtest_xml_outfiles_test.py

419
420
check_PROGRAMS += test/gtest_xml_output_unittest_
test_gtest_xml_output_unittest__SOURCES = test/gtest_xml_output_unittest_.cc
421
test_gtest_xml_output_unittest__LDADD = lib/libgtest.la
422
423
check_SCRIPTS += test/gtest_xml_output_unittest.py
TESTS += test/gtest_xml_output_unittest.py
shiqian's avatar
shiqian committed
424
425
426
427
428
429
430
431
432
433

# TODO(wan@google.com): make the build script compile and run the
#   negative-compilation tests.  (The test/gtest_nc* files are unfinished
#   implementation of tests for verifying that certain kinds of misuse
#   of Google Test don't compile.)
EXTRA_DIST += $(check_SCRIPTS) \
              test/gtest_nc.cc \
              test/gtest_nc_test.py

endif