You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

302 lines
9.4 KiB

  1. # Automake file
  2. ACLOCAL_AMFLAGS = -I m4
  3. # Nonstandard package files for distribution
  4. EXTRA_DIST = \
  5. CHANGES \
  6. CONTRIBUTORS \
  7. include/gtest/gtest-param-test.h.pump \
  8. include/gtest/internal/gtest-param-util-generated.h.pump \
  9. include/gtest/internal/gtest-tuple.h.pump \
  10. include/gtest/internal/gtest-type-util.h.pump \
  11. make/Makefile \
  12. scripts/fuse_gtest_files.py \
  13. scripts/gen_gtest_pred_impl.py \
  14. scripts/pump.py \
  15. scripts/test/Makefile
  16. # gtest source files that we don't compile directly. They are
  17. # #included by gtest-all.cc.
  18. GTEST_SRC = \
  19. src/gtest-death-test.cc \
  20. src/gtest-filepath.cc \
  21. src/gtest-internal-inl.h \
  22. src/gtest-port.cc \
  23. src/gtest-printers.cc \
  24. src/gtest-test-part.cc \
  25. src/gtest-typed-test.cc \
  26. src/gtest.cc
  27. EXTRA_DIST += $(GTEST_SRC)
  28. # Sample files that we don't compile.
  29. EXTRA_DIST += \
  30. samples/prime_tables.h \
  31. samples/sample2_unittest.cc \
  32. samples/sample3_unittest.cc \
  33. samples/sample4_unittest.cc \
  34. samples/sample5_unittest.cc \
  35. samples/sample6_unittest.cc \
  36. samples/sample7_unittest.cc \
  37. samples/sample8_unittest.cc \
  38. samples/sample9_unittest.cc
  39. # C++ test files that we don't compile directly.
  40. EXTRA_DIST += \
  41. test/gtest-death-test_ex_test.cc \
  42. test/gtest-death-test_test.cc \
  43. test/gtest-filepath_test.cc \
  44. test/gtest-linked_ptr_test.cc \
  45. test/gtest-listener_test.cc \
  46. test/gtest-message_test.cc \
  47. test/gtest-options_test.cc \
  48. test/gtest-param-test2_test.cc \
  49. test/gtest-param-test2_test.cc \
  50. test/gtest-param-test_test.cc \
  51. test/gtest-param-test_test.cc \
  52. test/gtest-param-test_test.h \
  53. test/gtest-port_test.cc \
  54. test/gtest-printers_test.cc \
  55. test/gtest-test-part_test.cc \
  56. test/gtest-tuple_test.cc \
  57. test/gtest-typed-test2_test.cc \
  58. test/gtest-typed-test_test.cc \
  59. test/gtest-typed-test_test.h \
  60. test/gtest-unittest-api_test.cc \
  61. test/gtest_break_on_failure_unittest_.cc \
  62. test/gtest_catch_exceptions_test_.cc \
  63. test/gtest_color_test_.cc \
  64. test/gtest_env_var_test_.cc \
  65. test/gtest_environment_test.cc \
  66. test/gtest_filter_unittest_.cc \
  67. test/gtest_help_test_.cc \
  68. test/gtest_list_tests_unittest_.cc \
  69. test/gtest_main_unittest.cc \
  70. test/gtest_no_test_unittest.cc \
  71. test/gtest_output_test_.cc \
  72. test/gtest_pred_impl_unittest.cc \
  73. test/gtest_prod_test.cc \
  74. test/gtest_repeat_test.cc \
  75. test/gtest_shuffle_test_.cc \
  76. test/gtest_sole_header_test.cc \
  77. test/gtest_stress_test.cc \
  78. test/gtest_throw_on_failure_ex_test.cc \
  79. test/gtest_throw_on_failure_test_.cc \
  80. test/gtest_uninitialized_test_.cc \
  81. test/gtest_unittest.cc \
  82. test/gtest_unittest.cc \
  83. test/gtest_xml_outfile1_test_.cc \
  84. test/gtest_xml_outfile2_test_.cc \
  85. test/gtest_xml_output_unittest_.cc \
  86. test/production.cc \
  87. test/production.h
  88. # Python tests that we don't run.
  89. EXTRA_DIST += \
  90. test/gtest_break_on_failure_unittest.py \
  91. test/gtest_catch_exceptions_test.py \
  92. test/gtest_color_test.py \
  93. test/gtest_env_var_test.py \
  94. test/gtest_filter_unittest.py \
  95. test/gtest_help_test.py \
  96. test/gtest_list_tests_unittest.py \
  97. test/gtest_output_test.py \
  98. test/gtest_output_test_golden_lin.txt \
  99. test/gtest_shuffle_test.py \
  100. test/gtest_test_utils.py \
  101. test/gtest_throw_on_failure_test.py \
  102. test/gtest_uninitialized_test.py \
  103. test/gtest_xml_outfiles_test.py \
  104. test/gtest_xml_output_unittest.py \
  105. test/gtest_xml_test_utils.py
  106. # CMake script
  107. EXTRA_DIST += \
  108. CMakeLists.txt \
  109. cmake/internal_utils.cmake
  110. # MSVC project files
  111. EXTRA_DIST += \
  112. msvc/gtest-md.sln \
  113. msvc/gtest-md.vcproj \
  114. msvc/gtest.sln \
  115. msvc/gtest.vcproj \
  116. msvc/gtest_main-md.vcproj \
  117. msvc/gtest_main.vcproj \
  118. msvc/gtest_prod_test-md.vcproj \
  119. msvc/gtest_prod_test.vcproj \
  120. msvc/gtest_unittest-md.vcproj \
  121. msvc/gtest_unittest.vcproj
  122. # xcode project files
  123. EXTRA_DIST += \
  124. xcode/Config/DebugProject.xcconfig \
  125. xcode/Config/FrameworkTarget.xcconfig \
  126. xcode/Config/General.xcconfig \
  127. xcode/Config/ReleaseProject.xcconfig \
  128. xcode/Config/StaticLibraryTarget.xcconfig \
  129. xcode/Config/TestTarget.xcconfig \
  130. xcode/Resources/Info.plist \
  131. xcode/Scripts/runtests.sh \
  132. xcode/Scripts/versiongenerate.py \
  133. xcode/gtest.xcodeproj/project.pbxproj
  134. # xcode sample files
  135. EXTRA_DIST += \
  136. xcode/Samples/FrameworkSample/Info.plist \
  137. xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj \
  138. xcode/Samples/FrameworkSample/runtests.sh \
  139. xcode/Samples/FrameworkSample/widget.cc \
  140. xcode/Samples/FrameworkSample/widget.h \
  141. xcode/Samples/FrameworkSample/widget_test.cc
  142. # C++Builder project files
  143. EXTRA_DIST += \
  144. codegear/gtest.cbproj \
  145. codegear/gtest.groupproj \
  146. codegear/gtest_all.cc \
  147. codegear/gtest_link.cc \
  148. codegear/gtest_main.cbproj \
  149. codegear/gtest_unittest.cbproj
  150. # Distribute and install M4 macro
  151. m4datadir = $(datadir)/aclocal
  152. m4data_DATA = m4/gtest.m4
  153. EXTRA_DIST += $(m4data_DATA)
  154. # We define the global AM_CPPFLAGS as everything we compile includes from these
  155. # directories.
  156. AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/include
  157. # Modifies compiler and linker flags for pthreads compatibility.
  158. if HAVE_PTHREADS
  159. AM_CXXFLAGS = @PTHREAD_CFLAGS@ -DGTEST_HAS_PTHREAD=1
  160. AM_LIBS = @PTHREAD_LIBS@
  161. else
  162. AM_CXXFLAGS = -DGTEST_HAS_PTHREAD=0
  163. endif
  164. # Build rules for libraries.
  165. lib_LTLIBRARIES = lib/libgtest.la lib/libgtest_main.la
  166. lib_libgtest_la_SOURCES = src/gtest-all.cc
  167. pkginclude_HEADERS = \
  168. include/gtest/gtest-death-test.h \
  169. include/gtest/gtest-message.h \
  170. include/gtest/gtest-param-test.h \
  171. include/gtest/gtest-printers.h \
  172. include/gtest/gtest-spi.h \
  173. include/gtest/gtest-test-part.h \
  174. include/gtest/gtest-typed-test.h \
  175. include/gtest/gtest.h \
  176. include/gtest/gtest_pred_impl.h \
  177. include/gtest/gtest_prod.h
  178. pkginclude_internaldir = $(pkgincludedir)/internal
  179. pkginclude_internal_HEADERS = \
  180. include/gtest/internal/gtest-death-test-internal.h \
  181. include/gtest/internal/gtest-filepath.h \
  182. include/gtest/internal/gtest-internal.h \
  183. include/gtest/internal/gtest-linked_ptr.h \
  184. include/gtest/internal/gtest-param-util-generated.h \
  185. include/gtest/internal/gtest-param-util.h \
  186. include/gtest/internal/gtest-port.h \
  187. include/gtest/internal/gtest-string.h \
  188. include/gtest/internal/gtest-tuple.h \
  189. include/gtest/internal/gtest-type-util.h
  190. lib_libgtest_main_la_SOURCES = src/gtest_main.cc
  191. lib_libgtest_main_la_LIBADD = lib/libgtest.la
  192. # Bulid rules for samples and tests. Automake's naming for some of
  193. # these variables isn't terribly obvious, so this is a brief
  194. # reference:
  195. #
  196. # TESTS -- Programs run automatically by "make check"
  197. # check_PROGRAMS -- Programs built by "make check" but not necessarily run
  198. noinst_LTLIBRARIES = samples/libsamples.la
  199. samples_libsamples_la_SOURCES = \
  200. samples/sample1.cc \
  201. samples/sample1.h \
  202. samples/sample2.cc \
  203. samples/sample2.h \
  204. samples/sample3-inl.h \
  205. samples/sample4.cc \
  206. samples/sample4.h
  207. TESTS=
  208. TESTS_ENVIRONMENT = GTEST_SOURCE_DIR="$(srcdir)/test" \
  209. GTEST_BUILD_DIR="$(top_builddir)/test"
  210. check_PROGRAMS=
  211. # A simple sample on using gtest.
  212. TESTS += samples/sample1_unittest
  213. check_PROGRAMS += samples/sample1_unittest
  214. samples_sample1_unittest_SOURCES = samples/sample1_unittest.cc
  215. samples_sample1_unittest_LDADD = lib/libgtest_main.la \
  216. lib/libgtest.la \
  217. samples/libsamples.la
  218. # Another sample. It also verifies that libgtest works.
  219. TESTS += samples/sample10_unittest
  220. check_PROGRAMS += samples/sample10_unittest
  221. samples_sample10_unittest_SOURCES = samples/sample10_unittest.cc
  222. samples_sample10_unittest_LDADD = lib/libgtest.la
  223. # This tests most constructs of gtest and verifies that libgtest_main
  224. # and libgtest work.
  225. TESTS += test/gtest_all_test
  226. check_PROGRAMS += test/gtest_all_test
  227. test_gtest_all_test_SOURCES = test/gtest_all_test.cc
  228. test_gtest_all_test_LDADD = lib/libgtest_main.la \
  229. lib/libgtest.la
  230. # Tests that fused gtest files compile and work.
  231. FUSED_GTEST_SRC = \
  232. fused-src/gtest/gtest-all.cc \
  233. fused-src/gtest/gtest.h \
  234. fused-src/gtest/gtest_main.cc
  235. TESTS += test/fused_gtest_test
  236. check_PROGRAMS += test/fused_gtest_test
  237. test_fused_gtest_test_SOURCES = $(FUSED_GTEST_SRC) \
  238. samples/sample1.cc samples/sample1_unittest.cc
  239. test_fused_gtest_test_CPPFLAGS = -I"$(srcdir)/fused-src"
  240. # Build rules for putting fused Google Test files into the distribution
  241. # package. The user can also create those files by manually running
  242. # scripts/fuse_gtest_files.py.
  243. $(test_fused_gtest_test_SOURCES): fused-gtest
  244. fused-gtest: $(pkginclude_HEADERS) $(pkginclude_internal_HEADERS) \
  245. $(GTEST_SRC) src/gtest-all.cc src/gtest_main.cc \
  246. scripts/fuse_gtest_files.py
  247. mkdir -p "$(srcdir)/fused-src"
  248. chmod -R u+w "$(srcdir)/fused-src"
  249. rm -f "$(srcdir)/fused-src/gtest/gtest-all.cc"
  250. rm -f "$(srcdir)/fused-src/gtest/gtest.h"
  251. "$(srcdir)/scripts/fuse_gtest_files.py" "$(srcdir)/fused-src"
  252. cp -f "$(srcdir)/src/gtest_main.cc" "$(srcdir)/fused-src/gtest/"
  253. maintainer-clean-local:
  254. rm -rf "$(srcdir)/fused-src"
  255. # Death tests may produce core dumps in the build directory. In case
  256. # this happens, clean them to keep distcleancheck happy.
  257. CLEANFILES = core
  258. # Disables 'make install' as installing a compiled version of Google
  259. # Test can lead to undefined behavior due to violation of the
  260. # One-Definition Rule.
  261. install-exec-local:
  262. echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Test into your build system."
  263. false
  264. install-data-local:
  265. echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Test into your build system."
  266. false