1 # Automake file 2 3 # TODO(chandlerc (a] google.com): automate the generation of *.h from *.h.pump. 4 5 # Nonstandard package files for distribution 6 EXTRA_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 23 EXTRA_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 36 EXTRA_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 49 EXTRA_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 57 EXTRA_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 (a] 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 71 bin_SCRIPTS = scripts/gtest-config 72 CLEANFILES = $(bin_SCRIPTS) 73 74 # Distribute and install M4 macro 75 m4datadir = $(datadir)/aclocal 76 m4data_DATA = m4/gtest.m4 77 EXTRA_DIST += $(m4data_DATA) 78 79 # We define the global AM_CPPFLAGS as everything we compile includes from these 80 # directories. 81 AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/include 82 83 # Build rules for libraries. 84 lib_LTLIBRARIES = lib/libgtest.la lib/libgtest_main.la 85 86 lib_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 94 pkginclude_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 104 pkginclude_internaldir = $(pkgincludedir)/internal 105 pkginclude_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 117 lib_libgtest_main_la_SOURCES = src/gtest_main.cc 118 lib_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 127 noinst_LTLIBRARIES = samples/libsamples.la 128 129 samples_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 137 TESTS= 138 TESTS_ENVIRONMENT = GTEST_SOURCE_DIR="$(srcdir)/test" \ 139 GTEST_BUILD_DIR="$(top_builddir)/test" 140 check_PROGRAMS= 141 142 TESTS += samples/sample1_unittest 143 check_PROGRAMS += samples/sample1_unittest 144 samples_sample1_unittest_SOURCES = samples/sample1_unittest.cc 145 samples_sample1_unittest_LDADD = lib/libgtest_main.la \ 146 samples/libsamples.la 147 148 TESTS += samples/sample2_unittest 149 check_PROGRAMS += samples/sample2_unittest 150 samples_sample2_unittest_SOURCES = samples/sample2_unittest.cc 151 samples_sample2_unittest_LDADD = lib/libgtest_main.la \ 152 samples/libsamples.la 153 154 TESTS += samples/sample3_unittest 155 check_PROGRAMS += samples/sample3_unittest 156 samples_sample3_unittest_SOURCES = samples/sample3_unittest.cc 157 samples_sample3_unittest_LDADD = lib/libgtest_main.la \ 158 samples/libsamples.la 159 160 TESTS += samples/sample4_unittest 161 check_PROGRAMS += samples/sample4_unittest 162 samples_sample4_unittest_SOURCES = samples/sample4_unittest.cc 163 samples_sample4_unittest_LDADD = lib/libgtest_main.la \ 164 samples/libsamples.la 165 166 TESTS += samples/sample5_unittest 167 check_PROGRAMS += samples/sample5_unittest 168 samples_sample5_unittest_SOURCES = samples/sample5_unittest.cc 169 samples_sample5_unittest_LDADD = lib/libgtest_main.la \ 170 samples/libsamples.la 171 172 TESTS += samples/sample6_unittest 173 check_PROGRAMS += samples/sample6_unittest 174 samples_sample6_unittest_SOURCES = samples/prime_tables.h \ 175 samples/sample6_unittest.cc 176 samples_sample6_unittest_LDADD = lib/libgtest_main.la 177 178 TESTS += samples/sample7_unittest 179 check_PROGRAMS += samples/sample7_unittest 180 samples_sample7_unittest_SOURCES = samples/prime_tables.h \ 181 samples/sample7_unittest.cc 182 samples_sample7_unittest_LDADD = lib/libgtest_main.la 183 184 TESTS += samples/sample8_unittest 185 check_PROGRAMS += samples/sample8_unittest 186 samples_sample8_unittest_SOURCES = samples/prime_tables.h \ 187 samples/sample8_unittest.cc 188 samples_sample8_unittest_LDADD = lib/libgtest_main.la 189 190 TESTS += samples/sample9_unittest 191 check_PROGRAMS += samples/sample9_unittest 192 samples_sample9_unittest_SOURCES = samples/sample9_unittest.cc 193 samples_sample9_unittest_LDADD = lib/libgtest.la 194 195 TESTS += samples/sample10_unittest 196 check_PROGRAMS += samples/sample10_unittest 197 samples_sample10_unittest_SOURCES = samples/sample10_unittest.cc 198 samples_sample10_unittest_LDADD = lib/libgtest.la 199 200 TESTS += test/gtest-death-test_test 201 check_PROGRAMS += test/gtest-death-test_test 202 test_gtest_death_test_test_SOURCES = test/gtest-death-test_test.cc 203 test_gtest_death_test_test_CXXFLAGS = $(AM_CXXFLAGS) $(PTHREAD_CFLAGS) 204 test_gtest_death_test_test_LDADD = $(PTHREAD_LIBS) $(PTHREAD_CFLAGS) \ 205 lib/libgtest_main.la 206 207 TESTS += test/gtest_environment_test 208 check_PROGRAMS += test/gtest_environment_test 209 test_gtest_environment_test_SOURCES = test/gtest_environment_test.cc 210 test_gtest_environment_test_LDADD = lib/libgtest.la 211 212 TESTS += test/gtest-filepath_test 213 check_PROGRAMS += test/gtest-filepath_test 214 test_gtest_filepath_test_SOURCES = test/gtest-filepath_test.cc 215 test_gtest_filepath_test_LDADD = lib/libgtest_main.la 216 217 TESTS += test/gtest-linked_ptr_test 218 check_PROGRAMS += test/gtest-linked_ptr_test 219 test_gtest_linked_ptr_test_SOURCES = test/gtest-linked_ptr_test.cc 220 test_gtest_linked_ptr_test_LDADD = lib/libgtest_main.la 221 222 TESTS += test/gtest_main_unittest 223 check_PROGRAMS += test/gtest_main_unittest 224 test_gtest_main_unittest_SOURCES = test/gtest_main_unittest.cc 225 test_gtest_main_unittest_LDADD = lib/libgtest_main.la 226 227 TESTS += test/gtest-message_test 228 check_PROGRAMS += test/gtest-message_test 229 test_gtest_message_test_SOURCES = test/gtest-message_test.cc 230 test_gtest_message_test_LDADD = lib/libgtest_main.la 231 232 TESTS += test/gtest_no_test_unittest 233 check_PROGRAMS += test/gtest_no_test_unittest 234 test_gtest_no_test_unittest_SOURCES = test/gtest_no_test_unittest.cc 235 test_gtest_no_test_unittest_LDADD = lib/libgtest.la 236 237 TESTS += test/gtest-options_test 238 check_PROGRAMS += test/gtest-options_test 239 test_gtest_options_test_SOURCES = test/gtest-options_test.cc 240 test_gtest_options_test_LDADD = lib/libgtest_main.la 241 242 TESTS += test/gtest-param-test_test 243 check_PROGRAMS += test/gtest-param-test_test 244 test_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 247 test_gtest_param_test_test_LDADD = lib/libgtest.la 248 249 TESTS += test/gtest-port_test 250 check_PROGRAMS += test/gtest-port_test 251 test_gtest_port_test_SOURCES = test/gtest-port_test.cc 252 test_gtest_port_test_LDADD = lib/libgtest_main.la 253 254 TESTS += test/gtest_pred_impl_unittest 255 check_PROGRAMS += test/gtest_pred_impl_unittest 256 test_gtest_pred_impl_unittest_SOURCES = test/gtest_pred_impl_unittest.cc 257 test_gtest_pred_impl_unittest_LDADD = lib/libgtest_main.la 258 259 TESTS += test/gtest_prod_test 260 check_PROGRAMS += test/gtest_prod_test 261 test_gtest_prod_test_SOURCES = test/gtest_prod_test.cc \ 262 test/production.cc \ 263 test/production.h 264 test_gtest_prod_test_LDADD = lib/libgtest_main.la 265 266 TESTS += test/gtest_repeat_test 267 check_PROGRAMS += test/gtest_repeat_test 268 test_gtest_repeat_test_SOURCES = test/gtest_repeat_test.cc 269 test_gtest_repeat_test_LDADD = lib/libgtest.la 270 271 TESTS += test/gtest_sole_header_test 272 check_PROGRAMS += test/gtest_sole_header_test 273 test_gtest_sole_header_test_SOURCES = test/gtest_sole_header_test.cc 274 test_gtest_sole_header_test_LDADD = lib/libgtest_main.la 275 276 TESTS += test/gtest_stress_test 277 check_PROGRAMS += test/gtest_stress_test 278 test_gtest_stress_test_SOURCES = test/gtest_stress_test.cc 279 test_gtest_stress_test_LDADD = lib/libgtest.la 280 281 TESTS += test/gtest-test-part_test 282 check_PROGRAMS += test/gtest-test-part_test 283 test_gtest_test_part_test_SOURCES = test/gtest-test-part_test.cc 284 test_gtest_test_part_test_LDADD = lib/libgtest_main.la 285 286 TESTS += test/gtest_throw_on_failure_ex_test 287 check_PROGRAMS += test/gtest_throw_on_failure_ex_test 288 test_gtest_throw_on_failure_ex_test_SOURCES = \ 289 test/gtest_throw_on_failure_ex_test.cc \ 290 src/gtest-all.cc 291 test_gtest_throw_on_failure_ex_test_CXXFLAGS = $(AM_CXXFLAGS) -fexceptions 292 293 TESTS += test/gtest-typed-test_test 294 check_PROGRAMS += test/gtest-typed-test_test 295 test_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 298 test_gtest_typed_test_test_LDADD = lib/libgtest_main.la 299 300 TESTS += test/gtest_unittest 301 check_PROGRAMS += test/gtest_unittest 302 test_gtest_unittest_SOURCES = test/gtest_unittest.cc 303 test_gtest_unittest_LDADD = lib/libgtest_main.la 304 305 TESTS += test/gtest-unittest-api_test 306 check_PROGRAMS += test/gtest-unittest-api_test 307 test_gtest_unittest_api_test_SOURCES = test/gtest-unittest-api_test.cc 308 test_gtest_unittest_api_test_LDADD = lib/libgtest_main.la 309 310 TESTS += test/gtest-listener_test 311 check_PROGRAMS += test/gtest-listener_test 312 test_gtest_listener_test_SOURCES = test/gtest-listener_test.cc 313 test_gtest_listener_test_LDADD = lib/libgtest_main.la 314 315 # Verifies that Google Test works when RTTI is disabled. 316 TESTS += test/gtest_no_rtti_test 317 check_PROGRAMS += test/gtest_no_rtti_test 318 test_gtest_no_rtti_test_SOURCES = test/gtest_unittest.cc \ 319 src/gtest-all.cc \ 320 src/gtest_main.cc 321 test_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. 324 TESTS += test/gtest-tuple_test 325 check_PROGRAMS += test/gtest-tuple_test 326 test_gtest_tuple_test_SOURCES = test/gtest-tuple_test.cc \ 327 src/gtest-all.cc \ 328 src/gtest_main.cc 329 test_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. 332 TESTS += test/gtest_use_own_tuple_test 333 check_PROGRAMS += test/gtest_use_own_tuple_test 334 test_gtest_use_own_tuple_test_SOURCES = test/gtest-param-test_test.cc \ 335 test/gtest-param-test2_test.cc \ 336 src/gtest-all.cc 337 test_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 (a] 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. 346 if HAVE_PYTHON 347 check_SCRIPTS = 348 349 # These two Python modules are used by multiple Python tests below. 350 check_SCRIPTS += test/gtest_test_utils.py \ 351 test/gtest_xml_test_utils.py 352 353 check_PROGRAMS += test/gtest_break_on_failure_unittest_ 354 test_gtest_break_on_failure_unittest__SOURCES = \ 355 test/gtest_break_on_failure_unittest_.cc 356 test_gtest_break_on_failure_unittest__LDADD = lib/libgtest.la 357 check_SCRIPTS += test/gtest_break_on_failure_unittest.py 358 TESTS += test/gtest_break_on_failure_unittest.py 359 360 check_PROGRAMS += test/gtest_color_test_ 361 test_gtest_color_test__SOURCES = test/gtest_color_test_.cc 362 test_gtest_color_test__LDADD = lib/libgtest.la 363 check_SCRIPTS += test/gtest_color_test.py 364 TESTS += test/gtest_color_test.py 365 366 check_PROGRAMS += test/gtest_env_var_test_ 367 test_gtest_env_var_test__SOURCES = test/gtest_env_var_test_.cc 368 test_gtest_env_var_test__LDADD = lib/libgtest.la 369 check_SCRIPTS += test/gtest_env_var_test.py 370 TESTS += test/gtest_env_var_test.py 371 372 check_PROGRAMS += test/gtest_filter_unittest_ 373 test_gtest_filter_unittest__SOURCES = test/gtest_filter_unittest_.cc 374 test_gtest_filter_unittest__LDADD = lib/libgtest.la 375 check_SCRIPTS += test/gtest_filter_unittest.py 376 TESTS += test/gtest_filter_unittest.py 377 378 check_PROGRAMS += test/gtest_help_test_ 379 test_gtest_help_test__SOURCES = test/gtest_help_test_.cc 380 test_gtest_help_test__LDADD = lib/libgtest_main.la 381 check_SCRIPTS += test/gtest_help_test.py 382 TESTS += test/gtest_help_test.py 383 384 check_PROGRAMS += test/gtest_list_tests_unittest_ 385 test_gtest_list_tests_unittest__SOURCES = test/gtest_list_tests_unittest_.cc 386 test_gtest_list_tests_unittest__LDADD = lib/libgtest.la 387 check_SCRIPTS += test/gtest_list_tests_unittest.py 388 TESTS += test/gtest_list_tests_unittest.py 389 390 check_PROGRAMS += test/gtest_output_test_ 391 test_gtest_output_test__SOURCES = test/gtest_output_test_.cc 392 test_gtest_output_test__LDADD = lib/libgtest.la 393 check_SCRIPTS += test/gtest_output_test.py 394 EXTRA_DIST += test/gtest_output_test_golden_lin.txt \ 395 test/gtest_output_test_golden_win.txt 396 TESTS += test/gtest_output_test.py 397 398 check_PROGRAMS += test/gtest_shuffle_test_ 399 test_gtest_shuffle_test__SOURCES = test/gtest_shuffle_test_.cc 400 test_gtest_shuffle_test__LDADD = lib/libgtest.la 401 check_SCRIPTS += test/gtest_shuffle_test.py 402 TESTS += test/gtest_shuffle_test.py 403 404 check_PROGRAMS += test/gtest_throw_on_failure_test_ 405 test_gtest_throw_on_failure_test__SOURCES = \ 406 test/gtest_throw_on_failure_test_.cc \ 407 src/gtest-all.cc 408 test_gtest_throw_on_failure_test__CXXFLAGS = $(AM_CXXFLAGS) -fno-exceptions 409 check_SCRIPTS += test/gtest_throw_on_failure_test.py 410 TESTS += test/gtest_throw_on_failure_test.py 411 412 check_PROGRAMS += test/gtest_uninitialized_test_ 413 test_gtest_uninitialized_test__SOURCES = test/gtest_uninitialized_test_.cc 414 test_gtest_uninitialized_test__LDADD = lib/libgtest.la 415 check_SCRIPTS += test/gtest_uninitialized_test.py 416 TESTS += test/gtest_uninitialized_test.py 417 418 check_PROGRAMS += test/gtest_xml_outfile1_test_ 419 test_gtest_xml_outfile1_test__SOURCES = test/gtest_xml_outfile1_test_.cc 420 test_gtest_xml_outfile1_test__LDADD = lib/libgtest_main.la 421 check_PROGRAMS += test/gtest_xml_outfile2_test_ 422 test_gtest_xml_outfile2_test__SOURCES = test/gtest_xml_outfile2_test_.cc 423 test_gtest_xml_outfile2_test__LDADD = lib/libgtest_main.la 424 check_SCRIPTS += test/gtest_xml_outfiles_test.py 425 TESTS += test/gtest_xml_outfiles_test.py 426 427 check_PROGRAMS += test/gtest_xml_output_unittest_ 428 test_gtest_xml_output_unittest__SOURCES = test/gtest_xml_output_unittest_.cc 429 test_gtest_xml_output_unittest__LDADD = lib/libgtest.la 430 check_SCRIPTS += test/gtest_xml_output_unittest.py 431 TESTS += test/gtest_xml_output_unittest.py 432 433 # TODO(wan (a] 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.) 437 EXTRA_DIST += $(check_SCRIPTS) \ 438 test/gtest_nc.cc \ 439 test/gtest_nc_test.py 440 441 endif 442