2010-02-24 17:21:37 +00:00
|
|
|
# Automake file
|
|
|
|
|
2008-12-10 05:08:54 +00:00
|
|
|
# Nonstandard package files for distribution.
|
2013-01-31 19:53:54 +00:00
|
|
|
EXTRA_DIST = LICENSE
|
2008-12-10 05:08:54 +00:00
|
|
|
|
2008-12-10 18:34:33 +00:00
|
|
|
# We may need to build our internally packaged gtest. If so, it will be
|
|
|
|
# included in the 'subdirs' variable.
|
|
|
|
SUBDIRS = $(subdirs)
|
|
|
|
|
2008-12-11 00:13:55 +00:00
|
|
|
# This is generated by the configure script, so clean it for distribution.
|
|
|
|
DISTCLEANFILES = scripts/gmock-config
|
2008-12-10 05:08:54 +00:00
|
|
|
|
|
|
|
# We define the global AM_CPPFLAGS as everything we compile includes from these
|
|
|
|
# directories.
|
|
|
|
AM_CPPFLAGS = $(GTEST_CPPFLAGS) -I$(srcdir)/include
|
|
|
|
|
2010-02-24 17:21:37 +00:00
|
|
|
# Modifies compiler and linker flags for pthreads compatibility.
|
|
|
|
if HAVE_PTHREADS
|
|
|
|
AM_CXXFLAGS = @PTHREAD_CFLAGS@ -DGTEST_HAS_PTHREAD=1
|
|
|
|
AM_LIBS = @PTHREAD_LIBS@
|
|
|
|
endif
|
|
|
|
|
2008-12-10 05:08:54 +00:00
|
|
|
# Build rules for libraries.
|
|
|
|
lib_LTLIBRARIES = lib/libgmock.la lib/libgmock_main.la
|
|
|
|
|
2009-12-18 08:00:42 +00:00
|
|
|
lib_libgmock_la_SOURCES = src/gmock-all.cc
|
2008-12-10 05:08:54 +00:00
|
|
|
|
2010-08-09 22:46:12 +00:00
|
|
|
pkginclude_HEADERS = \
|
|
|
|
include/gmock/gmock-actions.h \
|
|
|
|
include/gmock/gmock-cardinalities.h \
|
|
|
|
include/gmock/gmock-generated-actions.h \
|
|
|
|
include/gmock/gmock-generated-function-mockers.h \
|
|
|
|
include/gmock/gmock-generated-matchers.h \
|
|
|
|
include/gmock/gmock-generated-nice-strict.h \
|
|
|
|
include/gmock/gmock-matchers.h \
|
|
|
|
include/gmock/gmock-more-actions.h \
|
2013-08-27 21:04:16 +00:00
|
|
|
include/gmock/gmock-more-matchers.h \
|
2010-08-09 22:46:12 +00:00
|
|
|
include/gmock/gmock-spec-builders.h \
|
|
|
|
include/gmock/gmock.h
|
2008-12-10 05:08:54 +00:00
|
|
|
|
|
|
|
pkginclude_internaldir = $(pkgincludedir)/internal
|
|
|
|
pkginclude_internal_HEADERS = \
|
|
|
|
include/gmock/internal/gmock-generated-internal-utils.h \
|
|
|
|
include/gmock/internal/gmock-internal-utils.h \
|
|
|
|
include/gmock/internal/gmock-port.h
|
|
|
|
|
|
|
|
lib_libgmock_main_la_SOURCES = src/gmock_main.cc
|
|
|
|
lib_libgmock_main_la_LIBADD = lib/libgmock.la
|
|
|
|
|
|
|
|
# Build rules for tests. Automake's naming for some of these variables isn't
|
|
|
|
# terribly obvious, so this is a brief reference:
|
|
|
|
#
|
|
|
|
# TESTS -- Programs run automatically by "make check"
|
|
|
|
# check_PROGRAMS -- Programs built by "make check" but not necessarily run
|
|
|
|
|
|
|
|
TESTS=
|
|
|
|
check_PROGRAMS=
|
|
|
|
AM_LDFLAGS = $(GTEST_LDFLAGS)
|
|
|
|
|
2009-12-18 08:00:42 +00:00
|
|
|
# This exercises all major components of Google Mock. It also
|
|
|
|
# verifies that libgmock works.
|
|
|
|
TESTS += test/gmock-spec-builders_test
|
|
|
|
check_PROGRAMS += test/gmock-spec-builders_test
|
|
|
|
test_gmock_spec_builders_test_SOURCES = test/gmock-spec-builders_test.cc
|
|
|
|
test_gmock_spec_builders_test_LDADD = $(GTEST_LIBS) lib/libgmock.la
|
2008-12-10 05:08:54 +00:00
|
|
|
|
2009-12-18 08:00:42 +00:00
|
|
|
# This tests using Google Mock in multiple translation units. It also
|
2011-04-07 07:19:40 +00:00
|
|
|
# verifies that libgmock_main and libgmock work.
|
2008-12-10 05:08:54 +00:00
|
|
|
TESTS += test/gmock_link_test
|
|
|
|
check_PROGRAMS += test/gmock_link_test
|
2010-08-09 22:46:12 +00:00
|
|
|
test_gmock_link_test_SOURCES = \
|
|
|
|
test/gmock_link2_test.cc \
|
|
|
|
test/gmock_link_test.cc \
|
|
|
|
test/gmock_link_test.h
|
2011-04-07 07:19:40 +00:00
|
|
|
test_gmock_link_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la lib/libgmock.la
|
2008-12-10 05:08:54 +00:00
|
|
|
|
2011-04-21 21:56:01 +00:00
|
|
|
if HAVE_PYTHON
|
|
|
|
# Tests that fused gmock files compile and work.
|
|
|
|
TESTS += test/gmock_fused_test
|
|
|
|
check_PROGRAMS += test/gmock_fused_test
|
|
|
|
test_gmock_fused_test_SOURCES = \
|
|
|
|
fused-src/gmock-gtest-all.cc \
|
|
|
|
fused-src/gmock/gmock.h \
|
|
|
|
fused-src/gmock_main.cc \
|
|
|
|
fused-src/gtest/gtest.h \
|
|
|
|
test/gmock_test.cc
|
|
|
|
test_gmock_fused_test_CPPFLAGS = -I"$(srcdir)/fused-src"
|
|
|
|
endif
|
2010-04-14 16:26:57 +00:00
|
|
|
|
2009-12-18 08:00:42 +00:00
|
|
|
# Google Mock source files that we don't compile directly.
|
2010-04-14 16:26:57 +00:00
|
|
|
GMOCK_SOURCE_INGLUDES = \
|
2009-12-18 08:00:42 +00:00
|
|
|
src/gmock-cardinalities.cc \
|
|
|
|
src/gmock-internal-utils.cc \
|
|
|
|
src/gmock-matchers.cc \
|
2010-08-09 22:46:12 +00:00
|
|
|
src/gmock-spec-builders.cc \
|
|
|
|
src/gmock.cc
|
2009-12-18 08:00:42 +00:00
|
|
|
|
2010-04-14 16:26:57 +00:00
|
|
|
EXTRA_DIST += $(GMOCK_SOURCE_INGLUDES)
|
|
|
|
|
2009-12-18 08:00:42 +00:00
|
|
|
# C++ tests that we don't compile using autotools.
|
|
|
|
EXTRA_DIST += \
|
|
|
|
test/gmock-actions_test.cc \
|
2013-08-27 21:31:58 +00:00
|
|
|
test/gmock_all_test.cc \
|
2009-12-18 08:00:42 +00:00
|
|
|
test/gmock-cardinalities_test.cc \
|
2013-08-27 21:31:58 +00:00
|
|
|
test/gmock_ex_test.cc \
|
2009-12-18 08:00:42 +00:00
|
|
|
test/gmock-generated-actions_test.cc \
|
|
|
|
test/gmock-generated-function-mockers_test.cc \
|
|
|
|
test/gmock-generated-internal-utils_test.cc \
|
|
|
|
test/gmock-generated-matchers_test.cc \
|
|
|
|
test/gmock-internal-utils_test.cc \
|
|
|
|
test/gmock-matchers_test.cc \
|
|
|
|
test/gmock-more-actions_test.cc \
|
|
|
|
test/gmock-nice-strict_test.cc \
|
2010-08-09 22:46:12 +00:00
|
|
|
test/gmock-port_test.cc \
|
2013-08-27 21:31:58 +00:00
|
|
|
test/gmock_stress_test.cc
|
2009-12-18 08:00:42 +00:00
|
|
|
|
|
|
|
# Python tests, which we don't run using autotools.
|
|
|
|
EXTRA_DIST += \
|
|
|
|
test/gmock_leak_test.py \
|
2010-08-09 22:46:12 +00:00
|
|
|
test/gmock_leak_test_.cc \
|
2009-12-18 08:00:42 +00:00
|
|
|
test/gmock_output_test.py \
|
2010-08-09 22:46:12 +00:00
|
|
|
test/gmock_output_test_.cc \
|
|
|
|
test/gmock_output_test_golden.txt \
|
|
|
|
test/gmock_test_utils.py
|
2008-12-10 05:08:54 +00:00
|
|
|
|
|
|
|
# Nonstandard package files for distribution.
|
|
|
|
EXTRA_DIST += \
|
2010-08-09 22:46:12 +00:00
|
|
|
CHANGES \
|
|
|
|
CONTRIBUTORS \
|
|
|
|
make/Makefile
|
2008-12-10 05:08:54 +00:00
|
|
|
|
|
|
|
# Pump scripts for generating Google Mock headers.
|
|
|
|
# TODO(chandlerc@google.com): automate the generation of *.h from *.h.pump.
|
2010-08-09 22:46:12 +00:00
|
|
|
EXTRA_DIST += \
|
|
|
|
include/gmock/gmock-generated-actions.h.pump \
|
|
|
|
include/gmock/gmock-generated-function-mockers.h.pump \
|
|
|
|
include/gmock/gmock-generated-matchers.h.pump \
|
|
|
|
include/gmock/gmock-generated-nice-strict.h.pump \
|
|
|
|
include/gmock/internal/gmock-generated-internal-utils.h.pump
|
2008-12-10 05:08:54 +00:00
|
|
|
|
2009-04-09 03:01:25 +00:00
|
|
|
# Script for fusing Google Mock and Google Test source files.
|
2010-04-22 23:37:47 +00:00
|
|
|
EXTRA_DIST += scripts/fuse_gmock_files.py
|
2009-04-09 03:01:25 +00:00
|
|
|
|
2008-12-10 05:08:54 +00:00
|
|
|
# The Google Mock Generator tool from the cppclean project.
|
|
|
|
EXTRA_DIST += \
|
2011-09-09 07:06:32 +00:00
|
|
|
scripts/generator/LICENSE \
|
2010-08-09 22:46:12 +00:00
|
|
|
scripts/generator/README \
|
|
|
|
scripts/generator/README.cppclean \
|
|
|
|
scripts/generator/cpp/__init__.py \
|
|
|
|
scripts/generator/cpp/ast.py \
|
|
|
|
scripts/generator/cpp/gmock_class.py \
|
|
|
|
scripts/generator/cpp/keywords.py \
|
|
|
|
scripts/generator/cpp/tokenize.py \
|
|
|
|
scripts/generator/cpp/utils.py \
|
|
|
|
scripts/generator/gmock_gen.py
|
2008-12-10 05:08:54 +00:00
|
|
|
|
2013-11-21 18:38:42 +00:00
|
|
|
# Script for diagnosing compiler errors in programs that use Google
|
|
|
|
# Mock.
|
|
|
|
EXTRA_DIST += scripts/gmock_doctor.py
|
|
|
|
|
2011-02-24 21:59:54 +00:00
|
|
|
# CMake scripts.
|
|
|
|
EXTRA_DIST += \
|
|
|
|
CMakeLists.txt
|
|
|
|
|
2008-12-10 07:50:41 +00:00
|
|
|
# Microsoft Visual Studio 2005 projects.
|
|
|
|
EXTRA_DIST += \
|
2011-02-12 01:56:45 +00:00
|
|
|
msvc/2005/gmock.sln \
|
|
|
|
msvc/2005/gmock.vcproj \
|
|
|
|
msvc/2005/gmock_config.vsprops \
|
|
|
|
msvc/2005/gmock_main.vcproj \
|
|
|
|
msvc/2005/gmock_test.vcproj
|
|
|
|
|
|
|
|
# Microsoft Visual Studio 2010 projects.
|
|
|
|
EXTRA_DIST += \
|
|
|
|
msvc/2010/gmock.sln \
|
|
|
|
msvc/2010/gmock.vcxproj \
|
|
|
|
msvc/2010/gmock_config.props \
|
|
|
|
msvc/2010/gmock_main.vcxproj \
|
|
|
|
msvc/2010/gmock_test.vcxproj
|
2010-04-14 16:26:57 +00:00
|
|
|
|
2011-04-21 21:56:01 +00:00
|
|
|
if HAVE_PYTHON
|
2010-04-14 16:26:57 +00:00
|
|
|
# gmock_test.cc does not really depend on files generated by the
|
|
|
|
# fused-gmock-internal rule. However, gmock_test.o does, and it is
|
|
|
|
# important to include test/gmock_test.cc as part of this rule in order to
|
|
|
|
# prevent compiling gmock_test.o until all dependent files have been
|
|
|
|
# generated.
|
|
|
|
$(test_gmock_fused_test_SOURCES): fused-gmock-internal
|
|
|
|
|
|
|
|
# TODO(vladl@google.com): Find a way to add Google Tests's sources here.
|
|
|
|
fused-gmock-internal: $(pkginclude_HEADERS) $(pkginclude_internal_HEADERS) \
|
|
|
|
$(lib_libgmock_la_SOURCES) $(GMOCK_SOURCE_INGLUDES) \
|
|
|
|
$(lib_libgmock_main_la_SOURCES) \
|
|
|
|
scripts/fuse_gmock_files.py
|
|
|
|
mkdir -p "$(srcdir)/fused-src"
|
|
|
|
chmod -R u+w "$(srcdir)/fused-src"
|
|
|
|
rm -f "$(srcdir)/fused-src/gtest/gtest.h"
|
|
|
|
rm -f "$(srcdir)/fused-src/gmock/gmock.h"
|
|
|
|
rm -f "$(srcdir)/fused-src/gmock-gtest-all.cc"
|
|
|
|
"$(srcdir)/scripts/fuse_gmock_files.py" "$(srcdir)/fused-src"
|
|
|
|
cp -f "$(srcdir)/src/gmock_main.cc" "$(srcdir)/fused-src"
|
|
|
|
|
|
|
|
maintainer-clean-local:
|
|
|
|
rm -rf "$(srcdir)/fused-src"
|
2011-04-21 21:56:01 +00:00
|
|
|
endif
|
2010-04-14 16:26:57 +00:00
|
|
|
|
|
|
|
# Death tests may produce core dumps in the build directory. In case
|
|
|
|
# this happens, clean them to keep distcleancheck happy.
|
|
|
|
CLEANFILES = core
|
2011-04-07 07:37:28 +00:00
|
|
|
|
|
|
|
# Disables 'make install' as installing a compiled version of Google
|
|
|
|
# Mock can lead to undefined behavior due to violation of the
|
|
|
|
# One-Definition Rule.
|
|
|
|
|
|
|
|
install-exec-local:
|
|
|
|
echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Mock into your build system."
|
|
|
|
false
|
|
|
|
|
|
|
|
install-data-local:
|
|
|
|
echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Mock into your build system."
|
|
|
|
false
|