PageRenderTime 53ms CodeModel.GetById 9ms app.highlight 37ms RepoModel.GetById 2ms app.codeStats 0ms

/Unittests/googletest/Makefile.am

http://unladen-swallow.googlecode.com/
Makefile | 441 lines | 336 code | 69 blank | 36 comment | 1 complexity | 84db139c8ee1bd7369867e758164f4f5 MD5 | raw file
  1# Automake file
  2
  3# TODO(chandlerc@google.com): automate the generation of *.h from *.h.pump.
  4
  5# Nonstandard package files for distribution
  6EXTRA_DIST = \
  7  CHANGES \
  8  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  scons/SConstruct \
 16  scons/SConstruct.common \
 17  scripts/fuse_gtest_files.py \
 18  scripts/gen_gtest_pred_impl.py \
 19  scripts/test/Makefile \
 20  test/gtest_all_test.cc
 21
 22# MSVC project files
 23EXTRA_DIST += \
 24  msvc/gtest-md.sln \
 25  msvc/gtest.sln \
 26  msvc/gtest-md.vcproj \
 27  msvc/gtest.vcproj \
 28  msvc/gtest_main-md.vcproj \
 29  msvc/gtest_main.vcproj \
 30  msvc/gtest_prod_test-md.vcproj \
 31  msvc/gtest_prod_test.vcproj \
 32  msvc/gtest_unittest-md.vcproj \
 33  msvc/gtest_unittest.vcproj
 34
 35# xcode project files
 36EXTRA_DIST += \
 37  xcode/Config/DebugProject.xcconfig \
 38  xcode/Config/FrameworkTarget.xcconfig \
 39  xcode/Config/General.xcconfig \
 40  xcode/Config/ReleaseProject.xcconfig \
 41  xcode/Config/StaticLibraryTarget.xcconfig \
 42  xcode/Config/TestTarget.xcconfig \
 43  xcode/Resources/Info.plist \
 44  xcode/Scripts/versiongenerate.py \
 45  xcode/Scripts/runtests.sh \
 46  xcode/gtest.xcodeproj/project.pbxproj
 47
 48# xcode sample files
 49EXTRA_DIST += \
 50  xcode/Samples/FrameworkSample/Info.plist \
 51  xcode/Samples/FrameworkSample/widget_test.cc \
 52  xcode/Samples/FrameworkSample/widget.cc \
 53  xcode/Samples/FrameworkSample/widget.h \
 54  xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj
 55
 56# C++Builder project files
 57EXTRA_DIST += \
 58  codegear/gtest_all.cc \
 59  codegear/gtest_link.cc \
 60  codegear/gtest.cbproj \
 61  codegear/gtest_main.cbproj \
 62  codegear/gtest_unittest.cbproj \
 63  codegear/gtest.groupproj
 64
 65# TODO(wan@google.com): integrate scripts/gen_gtest_pred_impl.py into
 66#   the build system such that a user can specify the maximum predicate
 67#   arity here and have the script automatically generate the
 68#   corresponding .h and .cc files.
 69
 70# Scripts and utilities
 71bin_SCRIPTS = scripts/gtest-config
 72CLEANFILES = $(bin_SCRIPTS)
 73
 74# Distribute and install M4 macro
 75m4datadir = $(datadir)/aclocal
 76m4data_DATA = m4/gtest.m4
 77EXTRA_DIST += $(m4data_DATA)
 78
 79# We define the global AM_CPPFLAGS as everything we compile includes from these
 80# directories.
 81AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/include
 82
 83# Build rules for libraries.
 84lib_LTLIBRARIES = lib/libgtest.la lib/libgtest_main.la
 85
 86lib_libgtest_la_SOURCES = src/gtest.cc \
 87                          src/gtest-death-test.cc \
 88                          src/gtest-filepath.cc \
 89                          src/gtest-internal-inl.h \
 90                          src/gtest-port.cc \
 91                          src/gtest-test-part.cc \
 92                          src/gtest-typed-test.cc
 93
 94pkginclude_HEADERS = include/gtest/gtest.h \
 95                     include/gtest/gtest-death-test.h \
 96                     include/gtest/gtest-message.h \
 97                     include/gtest/gtest-param-test.h \
 98                     include/gtest/gtest_pred_impl.h \
 99                     include/gtest/gtest_prod.h \
100                     include/gtest/gtest-spi.h \
101                     include/gtest/gtest-test-part.h \
102                     include/gtest/gtest-typed-test.h
103
104pkginclude_internaldir = $(pkgincludedir)/internal
105pkginclude_internal_HEADERS = \
106  include/gtest/internal/gtest-death-test-internal.h \
107  include/gtest/internal/gtest-filepath.h \
108  include/gtest/internal/gtest-internal.h \
109  include/gtest/internal/gtest-linked_ptr.h \
110  include/gtest/internal/gtest-param-util-generated.h \
111  include/gtest/internal/gtest-param-util.h \
112  include/gtest/internal/gtest-port.h \
113  include/gtest/internal/gtest-string.h \
114  include/gtest/internal/gtest-tuple.h \
115  include/gtest/internal/gtest-type-util.h
116
117lib_libgtest_main_la_SOURCES = src/gtest_main.cc
118lib_libgtest_main_la_LIBADD = lib/libgtest.la
119
120# Bulid rules for samples and tests. Automake's naming for some of
121# these variables isn't terribly obvious, so this is a brief
122# reference:
123#
124# TESTS -- Programs run automatically by "make check"
125# check_PROGRAMS -- Programs built by "make check" but not necessarily run
126
127noinst_LTLIBRARIES = samples/libsamples.la
128
129samples_libsamples_la_SOURCES = samples/sample1.cc \
130                                samples/sample1.h \
131                                samples/sample2.cc \
132                                samples/sample2.h \
133                                samples/sample3-inl.h \
134                                samples/sample4.cc \
135                                samples/sample4.h
136
137TESTS=
138TESTS_ENVIRONMENT = GTEST_SOURCE_DIR="$(srcdir)/test" \
139                    GTEST_BUILD_DIR="$(top_builddir)/test"
140check_PROGRAMS=
141
142TESTS += samples/sample1_unittest
143check_PROGRAMS += samples/sample1_unittest
144samples_sample1_unittest_SOURCES = samples/sample1_unittest.cc
145samples_sample1_unittest_LDADD = lib/libgtest_main.la \
146                                 samples/libsamples.la
147
148TESTS += samples/sample2_unittest
149check_PROGRAMS += samples/sample2_unittest
150samples_sample2_unittest_SOURCES = samples/sample2_unittest.cc
151samples_sample2_unittest_LDADD = lib/libgtest_main.la \
152                                 samples/libsamples.la
153
154TESTS += samples/sample3_unittest
155check_PROGRAMS += samples/sample3_unittest
156samples_sample3_unittest_SOURCES = samples/sample3_unittest.cc
157samples_sample3_unittest_LDADD = lib/libgtest_main.la \
158                                 samples/libsamples.la
159
160TESTS += samples/sample4_unittest
161check_PROGRAMS += samples/sample4_unittest
162samples_sample4_unittest_SOURCES = samples/sample4_unittest.cc
163samples_sample4_unittest_LDADD = lib/libgtest_main.la \
164                                 samples/libsamples.la
165
166TESTS += samples/sample5_unittest
167check_PROGRAMS += samples/sample5_unittest
168samples_sample5_unittest_SOURCES = samples/sample5_unittest.cc
169samples_sample5_unittest_LDADD = lib/libgtest_main.la \
170                                 samples/libsamples.la
171
172TESTS += samples/sample6_unittest
173check_PROGRAMS += samples/sample6_unittest
174samples_sample6_unittest_SOURCES = samples/prime_tables.h \
175                                   samples/sample6_unittest.cc
176samples_sample6_unittest_LDADD = lib/libgtest_main.la
177
178TESTS += samples/sample7_unittest
179check_PROGRAMS += samples/sample7_unittest
180samples_sample7_unittest_SOURCES = samples/prime_tables.h \
181                                   samples/sample7_unittest.cc
182samples_sample7_unittest_LDADD = lib/libgtest_main.la
183
184TESTS += samples/sample8_unittest
185check_PROGRAMS += samples/sample8_unittest
186samples_sample8_unittest_SOURCES = samples/prime_tables.h \
187                                   samples/sample8_unittest.cc
188samples_sample8_unittest_LDADD = lib/libgtest_main.la
189
190TESTS += samples/sample9_unittest
191check_PROGRAMS += samples/sample9_unittest
192samples_sample9_unittest_SOURCES = samples/sample9_unittest.cc
193samples_sample9_unittest_LDADD = lib/libgtest.la
194
195TESTS += samples/sample10_unittest
196check_PROGRAMS += samples/sample10_unittest
197samples_sample10_unittest_SOURCES = samples/sample10_unittest.cc
198samples_sample10_unittest_LDADD = lib/libgtest.la
199
200TESTS += test/gtest-death-test_test
201check_PROGRAMS += test/gtest-death-test_test
202test_gtest_death_test_test_SOURCES = test/gtest-death-test_test.cc
203test_gtest_death_test_test_CXXFLAGS = $(AM_CXXFLAGS) $(PTHREAD_CFLAGS)
204test_gtest_death_test_test_LDADD = $(PTHREAD_LIBS) $(PTHREAD_CFLAGS) \
205                                   lib/libgtest_main.la
206
207TESTS += test/gtest_environment_test
208check_PROGRAMS += test/gtest_environment_test
209test_gtest_environment_test_SOURCES = test/gtest_environment_test.cc
210test_gtest_environment_test_LDADD = lib/libgtest.la
211
212TESTS += test/gtest-filepath_test
213check_PROGRAMS += test/gtest-filepath_test
214test_gtest_filepath_test_SOURCES = test/gtest-filepath_test.cc
215test_gtest_filepath_test_LDADD = lib/libgtest_main.la
216
217TESTS += test/gtest-linked_ptr_test
218check_PROGRAMS += test/gtest-linked_ptr_test
219test_gtest_linked_ptr_test_SOURCES = test/gtest-linked_ptr_test.cc
220test_gtest_linked_ptr_test_LDADD = lib/libgtest_main.la
221
222TESTS += test/gtest_main_unittest
223check_PROGRAMS += test/gtest_main_unittest
224test_gtest_main_unittest_SOURCES = test/gtest_main_unittest.cc
225test_gtest_main_unittest_LDADD = lib/libgtest_main.la
226
227TESTS += test/gtest-message_test
228check_PROGRAMS += test/gtest-message_test
229test_gtest_message_test_SOURCES = test/gtest-message_test.cc
230test_gtest_message_test_LDADD = lib/libgtest_main.la
231
232TESTS += test/gtest_no_test_unittest
233check_PROGRAMS += test/gtest_no_test_unittest
234test_gtest_no_test_unittest_SOURCES = test/gtest_no_test_unittest.cc
235test_gtest_no_test_unittest_LDADD = lib/libgtest.la
236
237TESTS += test/gtest-options_test
238check_PROGRAMS += test/gtest-options_test
239test_gtest_options_test_SOURCES = test/gtest-options_test.cc
240test_gtest_options_test_LDADD = lib/libgtest_main.la
241
242TESTS += test/gtest-param-test_test
243check_PROGRAMS += test/gtest-param-test_test
244test_gtest_param_test_test_SOURCES = test/gtest-param-test_test.cc \
245                                     test/gtest-param-test2_test.cc \
246                                     test/gtest-param-test_test.h
247test_gtest_param_test_test_LDADD = lib/libgtest.la
248
249TESTS += test/gtest-port_test
250check_PROGRAMS += test/gtest-port_test
251test_gtest_port_test_SOURCES = test/gtest-port_test.cc
252test_gtest_port_test_LDADD = lib/libgtest_main.la
253
254TESTS += test/gtest_pred_impl_unittest
255check_PROGRAMS += test/gtest_pred_impl_unittest
256test_gtest_pred_impl_unittest_SOURCES = test/gtest_pred_impl_unittest.cc
257test_gtest_pred_impl_unittest_LDADD = lib/libgtest_main.la
258
259TESTS += test/gtest_prod_test
260check_PROGRAMS += test/gtest_prod_test
261test_gtest_prod_test_SOURCES = test/gtest_prod_test.cc \
262                               test/production.cc \
263                               test/production.h
264test_gtest_prod_test_LDADD = lib/libgtest_main.la
265
266TESTS += test/gtest_repeat_test
267check_PROGRAMS += test/gtest_repeat_test
268test_gtest_repeat_test_SOURCES = test/gtest_repeat_test.cc
269test_gtest_repeat_test_LDADD = lib/libgtest.la
270
271TESTS += test/gtest_sole_header_test
272check_PROGRAMS += test/gtest_sole_header_test
273test_gtest_sole_header_test_SOURCES = test/gtest_sole_header_test.cc
274test_gtest_sole_header_test_LDADD = lib/libgtest_main.la
275
276TESTS += test/gtest_stress_test
277check_PROGRAMS += test/gtest_stress_test
278test_gtest_stress_test_SOURCES = test/gtest_stress_test.cc
279test_gtest_stress_test_LDADD = lib/libgtest.la
280
281TESTS += test/gtest-test-part_test
282check_PROGRAMS += test/gtest-test-part_test
283test_gtest_test_part_test_SOURCES = test/gtest-test-part_test.cc
284test_gtest_test_part_test_LDADD = lib/libgtest_main.la
285
286TESTS += test/gtest_throw_on_failure_ex_test
287check_PROGRAMS += test/gtest_throw_on_failure_ex_test
288test_gtest_throw_on_failure_ex_test_SOURCES = \
289    test/gtest_throw_on_failure_ex_test.cc \
290    src/gtest-all.cc
291test_gtest_throw_on_failure_ex_test_CXXFLAGS = $(AM_CXXFLAGS) -fexceptions
292
293TESTS += test/gtest-typed-test_test
294check_PROGRAMS += test/gtest-typed-test_test
295test_gtest_typed_test_test_SOURCES = test/gtest-typed-test_test.cc \
296                                     test/gtest-typed-test2_test.cc \
297                                     test/gtest-typed-test_test.h
298test_gtest_typed_test_test_LDADD = lib/libgtest_main.la
299
300TESTS += test/gtest_unittest
301check_PROGRAMS += test/gtest_unittest
302test_gtest_unittest_SOURCES = test/gtest_unittest.cc
303test_gtest_unittest_LDADD = lib/libgtest_main.la
304
305TESTS += test/gtest-unittest-api_test
306check_PROGRAMS += test/gtest-unittest-api_test
307test_gtest_unittest_api_test_SOURCES = test/gtest-unittest-api_test.cc
308test_gtest_unittest_api_test_LDADD = lib/libgtest_main.la
309
310TESTS += test/gtest-listener_test
311check_PROGRAMS += test/gtest-listener_test
312test_gtest_listener_test_SOURCES = test/gtest-listener_test.cc
313test_gtest_listener_test_LDADD = lib/libgtest_main.la
314
315# Verifies that Google Test works when RTTI is disabled.
316TESTS += test/gtest_no_rtti_test
317check_PROGRAMS += test/gtest_no_rtti_test
318test_gtest_no_rtti_test_SOURCES = test/gtest_unittest.cc \
319                                  src/gtest-all.cc \
320                                  src/gtest_main.cc
321test_gtest_no_rtti_test_CXXFLAGS = $(AM_CXXFLAGS) -fno-rtti -DGTEST_HAS_RTTI=0
322
323# Verifies that Google Test's own TR1 tuple implementation works.
324TESTS += test/gtest-tuple_test
325check_PROGRAMS += test/gtest-tuple_test
326test_gtest_tuple_test_SOURCES = test/gtest-tuple_test.cc \
327                                src/gtest-all.cc \
328                                src/gtest_main.cc
329test_gtest_tuple_test_CXXFLAGS = $(AM_CXXFLAGS) -DGTEST_USE_OWN_TR1_TUPLE=1
330
331# Verifies that Google Test's features that use its own TR1 tuple work.
332TESTS += test/gtest_use_own_tuple_test
333check_PROGRAMS += test/gtest_use_own_tuple_test
334test_gtest_use_own_tuple_test_SOURCES = test/gtest-param-test_test.cc \
335                                        test/gtest-param-test2_test.cc \
336                                        src/gtest-all.cc
337test_gtest_use_own_tuple_test_CXXFLAGS = \
338    $(AM_CXXFLAGS) -DGTEST_USE_OWN_TR1_TUPLE=1
339
340# The following tests depend on the presence of a Python installation and are
341# keyed off of it. TODO(chandlerc@google.com): While we currently only attempt
342# to build and execute these tests if Autoconf has found Python v2.4 on the
343# system, we don't use the PYTHON variable it specified as the valid
344# interpreter. The problem is that TESTS_ENVIRONMENT is a global variable, and
345# thus we cannot distinguish between C++ unit tests and Python unit tests.
346if HAVE_PYTHON
347check_SCRIPTS =
348
349# These two Python modules are used by multiple Python tests below.
350check_SCRIPTS += test/gtest_test_utils.py \
351                 test/gtest_xml_test_utils.py
352
353check_PROGRAMS += test/gtest_break_on_failure_unittest_
354test_gtest_break_on_failure_unittest__SOURCES = \
355  test/gtest_break_on_failure_unittest_.cc
356test_gtest_break_on_failure_unittest__LDADD = lib/libgtest.la
357check_SCRIPTS += test/gtest_break_on_failure_unittest.py
358TESTS += test/gtest_break_on_failure_unittest.py
359
360check_PROGRAMS += test/gtest_color_test_
361test_gtest_color_test__SOURCES = test/gtest_color_test_.cc
362test_gtest_color_test__LDADD = lib/libgtest.la
363check_SCRIPTS += test/gtest_color_test.py
364TESTS += test/gtest_color_test.py
365
366check_PROGRAMS += test/gtest_env_var_test_
367test_gtest_env_var_test__SOURCES = test/gtest_env_var_test_.cc
368test_gtest_env_var_test__LDADD = lib/libgtest.la
369check_SCRIPTS += test/gtest_env_var_test.py
370TESTS += test/gtest_env_var_test.py
371
372check_PROGRAMS += test/gtest_filter_unittest_
373test_gtest_filter_unittest__SOURCES = test/gtest_filter_unittest_.cc
374test_gtest_filter_unittest__LDADD = lib/libgtest.la
375check_SCRIPTS += test/gtest_filter_unittest.py
376TESTS += test/gtest_filter_unittest.py
377
378check_PROGRAMS += test/gtest_help_test_
379test_gtest_help_test__SOURCES = test/gtest_help_test_.cc
380test_gtest_help_test__LDADD = lib/libgtest_main.la
381check_SCRIPTS += test/gtest_help_test.py
382TESTS += test/gtest_help_test.py
383
384check_PROGRAMS += test/gtest_list_tests_unittest_
385test_gtest_list_tests_unittest__SOURCES = test/gtest_list_tests_unittest_.cc
386test_gtest_list_tests_unittest__LDADD = lib/libgtest.la
387check_SCRIPTS += test/gtest_list_tests_unittest.py
388TESTS += test/gtest_list_tests_unittest.py
389
390check_PROGRAMS += test/gtest_output_test_
391test_gtest_output_test__SOURCES = test/gtest_output_test_.cc
392test_gtest_output_test__LDADD = lib/libgtest.la
393check_SCRIPTS += test/gtest_output_test.py
394EXTRA_DIST += test/gtest_output_test_golden_lin.txt \
395              test/gtest_output_test_golden_win.txt
396TESTS += test/gtest_output_test.py
397
398check_PROGRAMS += test/gtest_shuffle_test_
399test_gtest_shuffle_test__SOURCES = test/gtest_shuffle_test_.cc
400test_gtest_shuffle_test__LDADD = lib/libgtest.la
401check_SCRIPTS += test/gtest_shuffle_test.py
402TESTS += test/gtest_shuffle_test.py
403
404check_PROGRAMS += test/gtest_throw_on_failure_test_
405test_gtest_throw_on_failure_test__SOURCES = \
406  test/gtest_throw_on_failure_test_.cc \
407  src/gtest-all.cc
408test_gtest_throw_on_failure_test__CXXFLAGS = $(AM_CXXFLAGS) -fno-exceptions
409check_SCRIPTS += test/gtest_throw_on_failure_test.py
410TESTS += test/gtest_throw_on_failure_test.py
411
412check_PROGRAMS += test/gtest_uninitialized_test_
413test_gtest_uninitialized_test__SOURCES = test/gtest_uninitialized_test_.cc
414test_gtest_uninitialized_test__LDADD = lib/libgtest.la
415check_SCRIPTS += test/gtest_uninitialized_test.py
416TESTS += test/gtest_uninitialized_test.py
417
418check_PROGRAMS += test/gtest_xml_outfile1_test_
419test_gtest_xml_outfile1_test__SOURCES = test/gtest_xml_outfile1_test_.cc
420test_gtest_xml_outfile1_test__LDADD = lib/libgtest_main.la
421check_PROGRAMS += test/gtest_xml_outfile2_test_
422test_gtest_xml_outfile2_test__SOURCES = test/gtest_xml_outfile2_test_.cc
423test_gtest_xml_outfile2_test__LDADD = lib/libgtest_main.la
424check_SCRIPTS += test/gtest_xml_outfiles_test.py
425TESTS += test/gtest_xml_outfiles_test.py
426
427check_PROGRAMS += test/gtest_xml_output_unittest_
428test_gtest_xml_output_unittest__SOURCES = test/gtest_xml_output_unittest_.cc
429test_gtest_xml_output_unittest__LDADD = lib/libgtest.la
430check_SCRIPTS += test/gtest_xml_output_unittest.py
431TESTS += test/gtest_xml_output_unittest.py
432
433# TODO(wan@google.com): make the build script compile and run the
434#   negative-compilation tests.  (The test/gtest_nc* files are unfinished
435#   implementation of tests for verifying that certain kinds of misuse
436#   of Google Test don't compile.)
437EXTRA_DIST += $(check_SCRIPTS) \
438              test/gtest_nc.cc \
439              test/gtest_nc_test.py
440
441endif