The current implementation of FindGMock.cmake happens to work for the cases I've tried, but it could be improved:
- Google Mock comes with built-in version of Google Test, so it should never link with a different, separately detected gtest build.
- I'm not sure whether the compilation options for gmock are the same as for gtest, so the tests copied from FindGTest.cmake might not be appropriate.
Added gtest and gmock under src/external/.
Source code copied from Google Test / Google Mock 1.6.0 (see
README.Gromacs for details).
Build system adapted to build tests against these versions of gtest and
gmock. Added advanced CMake variables GMX_USE_GTEST and GMX_USE_GMOCK,
which can be used to disable building the frameworks (and tests that use
Google Test 1.6.0 handles test-thrown exceptions better (reports them as
failures instead of terminating the whole executable). With this
version, system-wide installation is no longer supported by Google, and
the officially supported way is to build the test framework as part of
the build system. Thus, the simplest way is to include the whole
framework in the source tree, which also makes it simpler to build the
#1 Updated by Teemu Murtola almost 9 years ago
- Status changed from New to Feedback wanted
- Assignee set to Teemu Murtola
- Target version set to 5.0
- % Done changed from 0 to 100
There is a commit pending review in gerrit that makes this issue obsolete by removing FindGMock.cmake (and FindGTest.cmake) completely.