Makefile.am 11 KB

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