Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
d19f5867
Commit
d19f5867
authored
Apr 14, 2010
by
zhanyong.wan
Browse files
Improves Makefile.am (by Vlad Losev); fixes Makefile and updates README (by Zhanyong Wan).
parent
aa28b178
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
290 additions
and
173 deletions
+290
-173
Makefile.am
Makefile.am
+41
-3
README
README
+240
-150
make/Makefile
make/Makefile
+9
-20
No files found.
Makefile.am
View file @
d19f5867
...
@@ -76,8 +76,18 @@ test_gmock_link_test_SOURCES = test/gmock_link_test.cc \
...
@@ -76,8 +76,18 @@ test_gmock_link_test_SOURCES = test/gmock_link_test.cc \
test
/gmock_link_test.h
test
/gmock_link_test.h
test_gmock_link_test_LDADD
=
$(GTEST_LIBS)
lib/libgmock_main.la
test_gmock_link_test_LDADD
=
$(GTEST_LIBS)
lib/libgmock_main.la
# 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_main.cc
\
fused-src/gmock/gmock.h
\
fused-src/gtest/gtest.h
\
test
/gmock_test.cc
test_gmock_fused_test_CPPFLAGS
=
-I
"
$(srcdir)
/fused-src"
# Google Mock source files that we don't compile directly.
# Google Mock source files that we don't compile directly.
EXTRA_DIST
+
=
\
GMOCK_SOURCE_INGLUDES
=
\
src/gmock.cc
\
src/gmock.cc
\
src/gmock-cardinalities.cc
\
src/gmock-cardinalities.cc
\
src/gmock-internal-utils.cc
\
src/gmock-internal-utils.cc
\
...
@@ -85,6 +95,8 @@ EXTRA_DIST += \
...
@@ -85,6 +95,8 @@ EXTRA_DIST += \
src/gmock-printers.cc
\
src/gmock-printers.cc
\
src/gmock-spec-builders.cc
src/gmock-spec-builders.cc
EXTRA_DIST
+=
$(GMOCK_SOURCE_INGLUDES)
# C++ tests that we don't compile using autotools.
# C++ tests that we don't compile using autotools.
EXTRA_DIST
+=
\
EXTRA_DIST
+=
\
test
/gmock_all_test.cc
\
test
/gmock_all_test.cc
\
...
@@ -99,8 +111,7 @@ EXTRA_DIST += \
...
@@ -99,8 +111,7 @@ EXTRA_DIST += \
test
/gmock-more-actions_test.cc
\
test
/gmock-more-actions_test.cc
\
test
/gmock-nice-strict_test.cc
\
test
/gmock-nice-strict_test.cc
\
test
/gmock-port_test.cc
\
test
/gmock-port_test.cc
\
test
/gmock-printers_test.cc
\
test
/gmock-printers_test.cc
test
/gmock_test.cc
# Python tests, which we don't run using autotools.
# Python tests, which we don't run using autotools.
EXTRA_DIST
+=
\
EXTRA_DIST
+=
\
...
@@ -152,3 +163,30 @@ EXTRA_DIST += \
...
@@ -152,3 +163,30 @@ EXTRA_DIST += \
msvc/gmock_main.vcproj
\
msvc/gmock_main.vcproj
\
msvc/gmock-spec-builders_test.vcproj
\
msvc/gmock-spec-builders_test.vcproj
\
msvc/gmock_test.vcproj
msvc/gmock_test.vcproj
# 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"
# Death tests may produce core dumps in the build directory. In case
# this happens, clean them to keep distcleancheck happy.
CLEANFILES
=
core
README
View file @
d19f5867
This diff is collapsed.
Click to expand it.
make/Makefile
View file @
d19f5867
...
@@ -27,15 +27,14 @@ GMOCK_DIR = ..
...
@@ -27,15 +27,14 @@ GMOCK_DIR = ..
USER_DIR
=
../test
USER_DIR
=
../test
# Flags passed to the preprocessor.
# Flags passed to the preprocessor.
CPPFLAGS
+=
-I
$(GMOCK_DIR)
-I
$(GMOCK_DIR)
/include
\
CPPFLAGS
+=
-I
$(GTEST_DIR)
/include
-I
$(GMOCK_DIR)
/include
-I
$(GTEST_DIR)
-I
$(GTEST_DIR)
/include
# Flags passed to the C++ compiler.
# Flags passed to the C++ compiler.
CXXFLAGS
+=
-g
-Wall
-Wextra
CXXFLAGS
+=
-g
-Wall
-Wextra
# All tests produced by this Makefile. Remember to add new tests you
# All tests produced by this Makefile. Remember to add new tests you
# created to the list.
# created to the list.
TESTS
=
gmock_link_test
gmock_test
TESTS
=
gmock_test
# All Google Test headers. Usually you shouldn't change this
# All Google Test headers. Usually you shouldn't change this
# definition.
# definition.
...
@@ -73,13 +72,16 @@ GMOCK_SRCS_ = $(GMOCK_DIR)/src/*.cc $(GMOCK_HEADERS)
...
@@ -73,13 +72,16 @@ GMOCK_SRCS_ = $(GMOCK_DIR)/src/*.cc $(GMOCK_HEADERS)
# Google Test compile fast and for ordinary users their source rarely
# Google Test compile fast and for ordinary users their source rarely
# changes.
# changes.
gtest-all.o
:
$(GTEST_SRCS_)
gtest-all.o
:
$(GTEST_SRCS_)
$(CXX)
$(CPPFLAGS)
$(CXXFLAGS)
-c
$(GTEST_DIR)
/src/gtest-all.cc
$(CXX)
$(CPPFLAGS)
-I
$(GTEST_DIR)
-I
$(GMOCK_DIR)
$(CXXFLAGS)
\
-c
$(GTEST_DIR)
/src/gtest-all.cc
gmock-all.o
:
$(GMOCK_SRCS_)
gmock-all.o
:
$(GMOCK_SRCS_)
$(CXX)
$(CPPFLAGS)
$(CXXFLAGS)
-c
$(GMOCK_DIR)
/src/gmock-all.cc
$(CXX)
$(CPPFLAGS)
-I
$(GTEST_DIR)
-I
$(GMOCK_DIR)
$(CXXFLAGS)
\
-c
$(GMOCK_DIR)
/src/gmock-all.cc
gmock_main.o
:
$(GMOCK_SRCS_)
gmock_main.o
:
$(GMOCK_SRCS_)
$(CXX)
$(CPPFLAGS)
$(CXXFLAGS)
-c
$(GMOCK_DIR)
/src/gmock_main.cc
$(CXX)
$(CPPFLAGS)
-I
$(GTEST_DIR)
-I
$(GMOCK_DIR)
$(CXXFLAGS)
\
-c
$(GMOCK_DIR)
/src/gmock_main.cc
gmock.a
:
gmock-all.o gtest-all.o
gmock.a
:
gmock-all.o gtest-all.o
$(AR)
$(ARFLAGS)
$@
$^
$(AR)
$(ARFLAGS)
$@
$^
...
@@ -89,21 +91,8 @@ gmock_main.a : gmock-all.o gtest-all.o gmock_main.o
...
@@ -89,21 +91,8 @@ gmock_main.a : gmock-all.o gtest-all.o gmock_main.o
# Builds a sample test.
# Builds a sample test.
gmock_link_test.o
:
$(USER_DIR)/gmock_link_test.cc
\
$(USER_DIR)/gmock_link_test.h $(GMOCK_HEADERS)
$(CXX)
$(CPPFLAGS)
$(CXXFLAGS)
-c
$(USER_DIR)
/gmock_link_test.cc
gmock_link2_test.o
:
$(USER_DIR)/gmock_link2_test.cc
\
$(USER_DIR)/gmock_link_test.h $(GMOCK_HEADERS)
$(CXX)
$(CPPFLAGS)
$(CXXFLAGS)
-c
$(USER_DIR)
/gmock_link2_test.cc
gmock_link_test
:
gmock_link_test.o gmock_link2_test.o gmock_main.a
$(CXX)
$(CPPFLAGS)
$(CXXFLAGS)
$^
-o
$@
# Builds another sample test.
gmock_test.o
:
$(USER_DIR)/gmock_test.cc $(GMOCK_HEADERS)
gmock_test.o
:
$(USER_DIR)/gmock_test.cc $(GMOCK_HEADERS)
$(CXX)
$(CPPFLAGS)
$(CXXFLAGS)
-c
$(USER_DIR)
/gmock_test.cc
$(CXX)
$(CPPFLAGS)
$(CXXFLAGS)
-c
$(USER_DIR)
/gmock_test.cc
gmock_test
:
gmock_test.o gmock_main.a
gmock_test
:
gmock_test.o gmock_main.a
$(CXX)
$(CPPFLAGS)
$(CXXFLAGS)
$^
-o
$@
$(CXX)
$(CPPFLAGS)
$(CXXFLAGS)
-lpthread
$^
-o
$@
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment