@@ -90,32 +90,40 @@ and their own tests from a git checkout, which has further requirements:
9090* [ Python] ( https://www.python.org/ ) v2.3 or newer (for running some of the
9191 tests and re-generating certain source files from templates)
9292* [ CMake] ( https://cmake.org/ ) v2.6.4 or newer
93- * [ GNU Build System] ( https://en.wikipedia.org/wiki/GNU_Build_System ) including
94- automake (>= 1.9), autoconf (>= 2.59), and libtool / libtoolize.
9593
96- ## Developing Google Test
94+ ## Developing Google Test and Google Mock
9795
98- This section discusses how to make your own changes to Google Test.
96+ This section discusses how to make your own changes to the Google Test project .
9997
100- ### Testing Google Test Itself
98+ ### Testing Google Test and Google Mock Themselves
10199
102100To make sure your changes work as intended and don't break existing
103- functionality, you'll want to compile and run Google Test's own tests. For that
104- you can use CMake:
101+ functionality, you'll want to compile and run Google Test and GoogleMock 's own
102+ tests. For that you can use CMake:
105103
106104 mkdir mybuild
107105 cd mybuild
108- cmake -Dgtest_build_tests=ON ${GTEST_DIR}
106+ cmake -Dgtest_build_tests=ON -Dgmock_build_tests=ON ${GTEST_REPO_DIR}
107+
108+ To choose between building only Google Test or Google Mock, you may modify your
109+ cmake command to be one of each
110+
111+ cmake -Dgtest_build_tests=ON ${GTEST_DIR} # sets up Google Test tests
112+ cmake -Dgmock_build_tests=ON ${GMOCK_DIR} # sets up Google Mock tests
109113
110114Make sure you have Python installed, as some of Google Test's tests are written
111115in Python. If the cmake command complains about not being able to find Python
112116(` Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) ` ), try telling it
113117explicitly where your Python executable can be found:
114118
115- cmake -DPYTHON_EXECUTABLE=path/to/python -Dgtest_build_tests=ON ${GTEST_DIR}
119+ cmake -DPYTHON_EXECUTABLE=path/to/python ...
120+
121+ Next, you can build Google Test and / or Google Mock and all desired tests. On
122+ \* nix, this is usually done by
123+
124+ make
116125
117- Next, you can build Google Test and all of its own tests. On \* nix, this is
118- usually done by 'make'. To run the tests, do
126+ To run the tests, do
119127
120128 make test
121129
@@ -132,27 +140,3 @@ You don't need to worry about regenerating the source files unless you need to
132140modify them. You would then modify the corresponding ` .pump ` files and run the
133141'[ pump.py] ( googlemock/scripts/pump.py ) ' generator script. See the
134142[ Pump Manual] ( googlemock/docs/pump_manual.md ) .
135-
136- ## Developing Google Mock
137-
138- This section discusses how to make your own changes to Google Mock.
139-
140- #### Testing Google Mock Itself
141-
142- To make sure your changes work as intended and don't break existing
143- functionality, you'll want to compile and run Google Test's own tests. For that
144- you'll need Autotools. First, make sure you have followed the instructions above
145- to configure Google Mock. Then, create a build output directory and enter it.
146- Next,
147-
148- ${GMOCK_DIR}/configure # try --help for more info
149-
150- Once you have successfully configured Google Mock, the build steps are standard
151- for GNU-style OSS packages.
152-
153- make # Standard makefile following GNU conventions
154- make check # Builds and runs all tests - all should pass.
155-
156- Note that when building your project against Google Mock, you are building
157- against Google Test as well. There is no need to configure Google Test
158- separately.
0 commit comments