diff options
author | danilcha <danilcha@gmail.com> | 2017-03-11 00:02:21 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-11 00:02:21 (GMT) |
commit | b2521c890a8cf56830f9de0e0830311b30e7f61e (patch) | |
tree | 86609bcc652b281f13884182985d33a92a32b9d7 | |
parent | aa148eb2b7f70ede0eb10de34b6254826bfb34f4 (diff) | |
download | googletest-b2521c890a8cf56830f9de0e0830311b30e7f61e.zip googletest-b2521c890a8cf56830f9de0e0830311b30e7f61e.tar.gz googletest-b2521c890a8cf56830f9de0e0830311b30e7f61e.tar.bz2 |
Update README.md
-rw-r--r-- | googlemock/README.md | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/googlemock/README.md b/googlemock/README.md index 7b13a6d..6fd9221 100644 --- a/googlemock/README.md +++ b/googlemock/README.md @@ -125,13 +125,34 @@ build Google Mock and its tests, which has further requirements: ### Building Google Mock ### +#### Using CMake #### + 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 +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. +may be of particular interest. +The only modification you will need is to change + + target_link_libraries(example gtest_main) + +to + + target_link_libraries(example gmock_main) + +However, we also recommend adding the following lines (if using CMake 2.8.11 or later): + + target_include_directories(gtest SYSTEM INTERFACE "${gtest_SOURCE_DIR}/include") + target_include_directories(gtest_main SYSTEM INTERFACE "${gtest_SOURCE_DIR}/include") + target_include_directories(gmock SYSTEM INTERFACE "${gmock_SOURCE_DIR}/include") + target_include_directories(gmock_main SYSTEM INTERFACE "${gmock_SOURCE_DIR}/include") + +This marks Google Mock includes as system, which will silence compiler warnings when +compiling your tests using clang with `-Wpedantic -Wall -Wextra -Wconversion`. + #### Preparing to Build (Unix only) #### |