Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
b2521c89
Commit
b2521c89
authored
Mar 11, 2017
by
danilcha
Committed by
GitHub
Mar 11, 2017
Browse files
Update README.md
parent
aa148eb2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
3 deletions
+24
-3
googlemock/README.md
googlemock/README.md
+24
-3
No files found.
googlemock/README.md
View file @
b2521c89
...
@@ -125,13 +125,34 @@ build Google Mock and its tests, which has further requirements:
...
@@ -125,13 +125,34 @@ build Google Mock and its tests, which has further requirements:
### Building Google Mock ###
### Building Google Mock ###
#### Using CMake ####
If you have CMake available, it is recommended that you follow the
If you have CMake available, it is recommended that you follow the
[
build instructions
][
gtest_cmakebuild
]
[
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
existing CMake project, the section
[
Incorporating Into An Existing CMake Project
][
gtest_incorpcmake
]
[
Incorporating Into An Existing CMake Project
][
gtest_incorpcmake
]
may be of particular interest. Otherwise, the following sections
may be of particular interest.
detail how to build Google Mock without CMake.
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) ####
#### Preparing to Build (Unix only) ####
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment