shiqian | d201456 | 2008-07-03 22:38:12 +0000 | [diff] [blame] | 1 | # Automake file |
| 2 | |
| 3 | # Nonstandard package files for distribution |
| 4 | EXTRA_DIST = \ |
| 5 | CHANGES \ |
| 6 | CONTRIBUTORS \ |
| 7 | scripts/gen_gtest_pred_impl.py |
| 8 | |
shiqian | e0ecb7a | 2008-07-09 20:58:26 +0000 | [diff] [blame] | 9 | # MSVC project files |
| 10 | EXTRA_DIST += \ |
| 11 | msvc/gtest.sln \ |
| 12 | msvc/gtest.vcproj \ |
| 13 | msvc/gtest_color_test_.vcproj \ |
| 14 | msvc/gtest_env_var_test_.vcproj \ |
| 15 | msvc/gtest_environment_test.vcproj \ |
| 16 | msvc/gtest_main.vcproj \ |
| 17 | msvc/gtest_output_test_.vcproj \ |
| 18 | msvc/gtest_prod_test.vcproj \ |
| 19 | msvc/gtest_uninitialized_test_.vcproj \ |
| 20 | msvc/gtest_unittest.vcproj |
| 21 | |
shiqian | d201456 | 2008-07-03 22:38:12 +0000 | [diff] [blame] | 22 | # TODO(wan@google.com): integrate scripts/gen_gtest_pred_impl.py into |
| 23 | # the build system such that a user can specify the maximum predicate |
| 24 | # arity here and have the script automatically generate the |
| 25 | # corresponding .h and .cc files. |
| 26 | |
| 27 | # Scripts and utilities |
| 28 | bin_SCRIPTS = scripts/gtest-config |
| 29 | CLEANFILES = $(bin_SCRIPTS) |
| 30 | |
| 31 | # Distribute and install M4 macro |
| 32 | m4datadir = $(datadir)/aclocal |
| 33 | m4data_DATA = m4/gtest.m4 |
| 34 | EXTRA_DIST += $(m4data_DATA) |
| 35 | |
| 36 | # We define the global AM_CPPFLAGS as everything we compile includes from these |
| 37 | # directories. |
| 38 | AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/include |
| 39 | |
| 40 | # Build rules for libraries. |
| 41 | lib_LTLIBRARIES = lib/libgtest.la lib/libgtest_main.la |
| 42 | |
| 43 | lib_libgtest_la_SOURCES = src/gtest.cc \ |
| 44 | src/gtest-death-test.cc \ |
| 45 | src/gtest-filepath.cc \ |
| 46 | src/gtest-internal-inl.h \ |
| 47 | src/gtest-port.cc |
| 48 | |
| 49 | pkginclude_HEADERS = include/gtest/gtest.h \ |
| 50 | include/gtest/gtest-death-test.h \ |
| 51 | include/gtest/gtest-message.h \ |
| 52 | include/gtest/gtest-spi.h \ |
| 53 | include/gtest/gtest_pred_impl.h \ |
| 54 | include/gtest/gtest_prod.h |
| 55 | |
| 56 | pkginclude_internaldir = $(pkgincludedir)/internal |
| 57 | pkginclude_internal_HEADERS = \ |
| 58 | include/gtest/internal/gtest-death-test-internal.h \ |
| 59 | include/gtest/internal/gtest-filepath.h \ |
| 60 | include/gtest/internal/gtest-internal.h \ |
| 61 | include/gtest/internal/gtest-port.h \ |
| 62 | include/gtest/internal/gtest-string.h |
| 63 | |
| 64 | lib_libgtest_main_la_SOURCES = src/gtest_main.cc |
| 65 | lib_libgtest_main_la_LIBADD = lib/libgtest.la |
| 66 | |
| 67 | # Bulid rules for samples and tests. Automake's naming for some of |
| 68 | # these variables isn't terribly obvious, so this is a brief |
| 69 | # reference: |
| 70 | # |
| 71 | # TESTS -- Programs run automatically by "make check" |
| 72 | # check_PROGRAMS -- Programs built by "make check" but not necessarily run |
| 73 | |
| 74 | noinst_LTLIBRARIES = samples/libsamples.la |
| 75 | |
| 76 | samples_libsamples_la_SOURCES = samples/sample1.cc \ |
| 77 | samples/sample1.h \ |
| 78 | samples/sample2.cc \ |
| 79 | samples/sample2.h \ |
| 80 | samples/sample3-inl.h \ |
| 81 | samples/sample4.cc \ |
| 82 | samples/sample4.h |
| 83 | |
| 84 | TESTS= |
| 85 | TESTS_ENVIRONMENT = GTEST_SOURCE_DIR="$(srcdir)/test" \ |
| 86 | GTEST_BUILD_DIR="$(top_builddir)/test" |
| 87 | check_PROGRAMS= |
| 88 | |
| 89 | TESTS += samples/sample1_unittest |
| 90 | check_PROGRAMS += samples/sample1_unittest |
| 91 | samples_sample1_unittest_SOURCES = samples/sample1_unittest.cc |
| 92 | samples_sample1_unittest_LDADD = lib/libgtest_main.la \ |
| 93 | samples/libsamples.la |
| 94 | |
| 95 | TESTS += samples/sample2_unittest |
| 96 | check_PROGRAMS += samples/sample2_unittest |
| 97 | samples_sample2_unittest_SOURCES = samples/sample2_unittest.cc |
| 98 | samples_sample2_unittest_LDADD = lib/libgtest_main.la \ |
| 99 | samples/libsamples.la |
| 100 | |
| 101 | TESTS += samples/sample3_unittest |
| 102 | check_PROGRAMS += samples/sample3_unittest |
| 103 | samples_sample3_unittest_SOURCES = samples/sample3_unittest.cc |
| 104 | samples_sample3_unittest_LDADD = lib/libgtest_main.la \ |
| 105 | samples/libsamples.la |
| 106 | |
| 107 | TESTS += samples/sample4_unittest |
| 108 | check_PROGRAMS += samples/sample4_unittest |
| 109 | samples_sample4_unittest_SOURCES = samples/sample4_unittest.cc |
| 110 | samples_sample4_unittest_LDADD = lib/libgtest_main.la \ |
| 111 | samples/libsamples.la |
| 112 | |
| 113 | TESTS += samples/sample5_unittest |
| 114 | check_PROGRAMS += samples/sample5_unittest |
| 115 | samples_sample5_unittest_SOURCES = samples/sample5_unittest.cc |
| 116 | samples_sample5_unittest_LDADD = lib/libgtest_main.la \ |
| 117 | samples/libsamples.la |
| 118 | |
| 119 | TESTS += test/gtest_unittest |
| 120 | check_PROGRAMS += test/gtest_unittest |
| 121 | test_gtest_unittest_SOURCES = test/gtest_unittest.cc |
| 122 | test_gtest_unittest_LDADD = lib/libgtest.la |
| 123 | |
| 124 | TESTS += test/gtest-death-test_test |
| 125 | check_PROGRAMS += test/gtest-death-test_test |
| 126 | test_gtest_death_test_test_SOURCES = test/gtest-death-test_test.cc |
| 127 | test_gtest_death_test_test_CXXFLAGS = $(AM_CXXFLAGS) -pthread |
| 128 | test_gtest_death_test_test_LDADD = -lpthread lib/libgtest_main.la |
| 129 | |
| 130 | TESTS += test/gtest-filepath_test |
| 131 | check_PROGRAMS += test/gtest-filepath_test |
| 132 | test_gtest_filepath_test_SOURCES = test/gtest-filepath_test.cc |
| 133 | test_gtest_filepath_test_LDADD = lib/libgtest_main.la |
| 134 | |
| 135 | TESTS += test/gtest-message_test |
| 136 | check_PROGRAMS += test/gtest-message_test |
| 137 | test_gtest_message_test_SOURCES = test/gtest-message_test.cc |
| 138 | test_gtest_message_test_LDADD = lib/libgtest_main.la |
| 139 | |
| 140 | TESTS += test/gtest-options_test |
| 141 | check_PROGRAMS += test/gtest-options_test |
| 142 | test_gtest_options_test_SOURCES = test/gtest-options_test.cc |
| 143 | test_gtest_options_test_LDADD = lib/libgtest_main.la |
| 144 | |
| 145 | TESTS += test/gtest_pred_impl_unittest |
| 146 | check_PROGRAMS += test/gtest_pred_impl_unittest |
| 147 | test_gtest_pred_impl_unittest_SOURCES = test/gtest_pred_impl_unittest.cc |
| 148 | test_gtest_pred_impl_unittest_LDADD = lib/libgtest_main.la |
| 149 | |
| 150 | TESTS += test/gtest_environment_test |
| 151 | check_PROGRAMS += test/gtest_environment_test |
| 152 | test_gtest_environment_test_SOURCES = test/gtest_environment_test.cc |
| 153 | test_gtest_environment_test_LDADD = lib/libgtest.la |
| 154 | |
| 155 | TESTS += test/gtest_no_test_unittest |
| 156 | check_PROGRAMS += test/gtest_no_test_unittest |
| 157 | test_gtest_no_test_unittest_SOURCES = test/gtest_no_test_unittest.cc |
| 158 | test_gtest_no_test_unittest_LDADD = lib/libgtest.la |
| 159 | |
| 160 | TESTS += test/gtest_main_unittest |
| 161 | check_PROGRAMS += test/gtest_main_unittest |
| 162 | test_gtest_main_unittest_SOURCES = test/gtest_main_unittest.cc |
| 163 | test_gtest_main_unittest_LDADD = lib/libgtest_main.la |
| 164 | |
| 165 | TESTS += test/gtest_prod_test |
| 166 | check_PROGRAMS += test/gtest_prod_test |
| 167 | test_gtest_prod_test_SOURCES = test/gtest_prod_test.cc \ |
| 168 | test/production.cc \ |
| 169 | test/production.h |
| 170 | test_gtest_prod_test_LDADD = lib/libgtest_main.la |
| 171 | |
| 172 | TESTS += test/gtest_repeat_test |
| 173 | check_PROGRAMS += test/gtest_repeat_test |
| 174 | test_gtest_repeat_test_SOURCES = test/gtest_repeat_test.cc |
| 175 | test_gtest_repeat_test_LDADD = lib/libgtest.la |
| 176 | |
| 177 | TESTS += test/gtest_stress_test |
| 178 | check_PROGRAMS += test/gtest_stress_test |
| 179 | test_gtest_stress_test_SOURCES = test/gtest_stress_test.cc |
| 180 | test_gtest_stress_test_LDADD = lib/libgtest.la |
| 181 | |
| 182 | # The following tests depend on the presence of a Python installation and are |
| 183 | # keyed off of it. TODO(chandlerc@google.com): While we currently only attempt |
| 184 | # to build and execute these tests if Autoconf has found Python v2.4 on the |
| 185 | # system, we don't use the PYTHON variable it specified as the valid |
| 186 | # interpreter. The problem is that TESTS_ENVIRONMENT is a global variable, and |
| 187 | # thus we cannot distinguish between C++ unit tests and Python unit tests. |
| 188 | if HAVE_PYTHON |
| 189 | check_SCRIPTS = |
| 190 | |
| 191 | # These two Python modules are used by multiple Pythong tests below. |
| 192 | check_SCRIPTS += test/gtest_test_utils.py \ |
| 193 | test/gtest_xml_test_utils.py |
| 194 | |
| 195 | check_PROGRAMS += test/gtest_output_test_ |
| 196 | test_gtest_output_test__SOURCES = test/gtest_output_test_.cc |
| 197 | test_gtest_output_test__LDADD = lib/libgtest.la |
| 198 | check_SCRIPTS += test/gtest_output_test.py |
| 199 | EXTRA_DIST += test/gtest_output_test_golden_lin.txt \ |
| 200 | test/gtest_output_test_golden_win.txt |
| 201 | TESTS += test/gtest_output_test.py |
| 202 | |
| 203 | check_PROGRAMS += test/gtest_color_test_ |
| 204 | test_gtest_color_test__SOURCES = test/gtest_color_test_.cc |
| 205 | test_gtest_color_test__LDADD = lib/libgtest.la |
| 206 | check_SCRIPTS += test/gtest_color_test.py |
| 207 | TESTS += test/gtest_color_test.py |
| 208 | |
| 209 | check_PROGRAMS += test/gtest_env_var_test_ |
| 210 | test_gtest_env_var_test__SOURCES = test/gtest_env_var_test_.cc |
| 211 | test_gtest_env_var_test__LDADD = lib/libgtest.la |
| 212 | check_SCRIPTS += test/gtest_env_var_test.py |
| 213 | TESTS += test/gtest_env_var_test.py |
| 214 | |
| 215 | check_PROGRAMS += test/gtest_filter_unittest_ |
| 216 | test_gtest_filter_unittest__SOURCES = test/gtest_filter_unittest_.cc |
| 217 | test_gtest_filter_unittest__LDADD = lib/libgtest.la |
| 218 | check_SCRIPTS += test/gtest_filter_unittest.py |
| 219 | TESTS += test/gtest_filter_unittest.py |
| 220 | |
| 221 | check_PROGRAMS += test/gtest_break_on_failure_unittest_ |
| 222 | test_gtest_break_on_failure_unittest__SOURCES = \ |
| 223 | test/gtest_break_on_failure_unittest_.cc |
| 224 | test_gtest_break_on_failure_unittest__LDADD = lib/libgtest.la |
| 225 | check_SCRIPTS += test/gtest_break_on_failure_unittest.py |
| 226 | TESTS += test/gtest_break_on_failure_unittest.py |
| 227 | |
| 228 | check_PROGRAMS += test/gtest_list_tests_unittest_ |
| 229 | test_gtest_list_tests_unittest__SOURCES = test/gtest_list_tests_unittest_.cc |
| 230 | test_gtest_list_tests_unittest__LDADD = lib/libgtest.la |
| 231 | check_SCRIPTS += test/gtest_list_tests_unittest.py |
| 232 | TESTS += test/gtest_list_tests_unittest.py |
| 233 | |
| 234 | check_PROGRAMS += test/gtest_xml_output_unittest_ |
| 235 | test_gtest_xml_output_unittest__SOURCES = test/gtest_xml_output_unittest_.cc |
| 236 | test_gtest_xml_output_unittest__LDADD = lib/libgtest_main.la |
| 237 | check_SCRIPTS += test/gtest_xml_output_unittest.py |
| 238 | TESTS += test/gtest_xml_output_unittest.py |
| 239 | |
| 240 | check_PROGRAMS += test/gtest_xml_outfile1_test_ |
| 241 | test_gtest_xml_outfile1_test__SOURCES = test/gtest_xml_outfile1_test_.cc |
| 242 | test_gtest_xml_outfile1_test__LDADD = lib/libgtest_main.la |
| 243 | check_PROGRAMS += test/gtest_xml_outfile2_test_ |
| 244 | test_gtest_xml_outfile2_test__SOURCES = test/gtest_xml_outfile2_test_.cc |
| 245 | test_gtest_xml_outfile2_test__LDADD = lib/libgtest_main.la |
| 246 | check_SCRIPTS += test/gtest_xml_outfiles_test.py |
| 247 | TESTS += test/gtest_xml_outfiles_test.py |
| 248 | |
| 249 | check_PROGRAMS += test/gtest_uninitialized_test_ |
| 250 | test_gtest_uninitialized_test__SOURCES = test/gtest_uninitialized_test_.cc |
| 251 | test_gtest_uninitialized_test__LDADD = lib/libgtest.la |
| 252 | check_SCRIPTS += test/gtest_uninitialized_test.py |
| 253 | TESTS += test/gtest_uninitialized_test.py |
| 254 | |
| 255 | # TODO(wan@google.com): make the build script compile and run the |
| 256 | # negative-compilation tests. (The test/gtest_nc* files are unfinished |
| 257 | # implementation of tests for verifying that certain kinds of misuse |
| 258 | # of Google Test don't compile.) |
| 259 | EXTRA_DIST += $(check_SCRIPTS) \ |
| 260 | test/gtest_nc.cc \ |
| 261 | test/gtest_nc_test.py |
| 262 | |
| 263 | endif |