Task #639
Improve FindGMock.cmake
Description
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.
Associated revisions
History
#1 Updated by Teemu Murtola over 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.
#2 Updated by Teemu Murtola about 9 years ago
- Status changed from Feedback wanted to Closed
Mentioned commit has been merged to master.
#3 Updated by Teemu Murtola almost 7 years ago
- Project changed from Source code reorganization to GROMACS
- Category set to testing
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
them).
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
tests.
Makes issue #639 obsolete (removes FindGMock.cmake completely) and
relates to #815 (removes FindCMake.cmake, which was copied from 2.8.2).
Change-Id: I021e81ea1529c8dea621c2d8b060c08987f9ca59