Added CMake configure-time download instructions to docs

Adds instructions for how to add gtest and gmock to
another CMake project directly. Downloading of the
googletest sources happens as configure time, allowing
it to be added to the main build directly via the
add_subdirectory() command. This ensures googletest is
built with the same compiler settings, etc. and will
typically result in a more robust and more convenient
build arrangement.
This commit is contained in:
Craig Scott
2015-12-08 00:14:24 +11:00
committed by Craig Scott
parent a2b8a8e076
commit cb502b7ad1
2 changed files with 115 additions and 2 deletions

View File

@@ -125,6 +125,14 @@ build Google Mock and its tests, which has further requirements:
### Building Google Mock ###
If you have CMake available, it is recommended that you follow the
[build instructions][gtest_cmakebuild]
as described for Google Test. If are using Google Mock with an
existing CMake project, the section
[Incorporating Into An Existing CMake Project][gtest_incorpcmake]
may be of particular interest. Otherwise, the following sections
detail how to build Google Mock without CMake.
#### Preparing to Build (Unix only) ####
If you are using a Unix system and plan to use the GNU Autotools build
@@ -331,3 +339,5 @@ patch.
Happy testing!
[gtest_readme]: ../googletest/README.md "googletest"
[gtest_cmakebuild]: ../googletest/README.md#using-cmake "Using CMake"
[gtest_incorpcmake]: ../googletest/README.md#incorporating-into-an-existing-cmake-project "Incorporating Into An Existing CMake Project"