How To Install gmock on CentOS 7
Introduction
In this tutorial we learn how to install gmock
on CentOS 7.
What is gmock
Inspired by jMock, EasyMock, and Hamcrest, and designed with C++’s specifics in mind, Google C++ Mocking Framework (or Google Mock for short) is a library for writing and using C++ mock classes. Google Mock o lets you create mock classes trivially using simple macros, o supports a rich set of matchers and actions, o handles unordered, partially ordered, or completely ordered expectations, o is extensible by users, and o works on Linux, Mac OS X, Windows, Windows Mobile, minGW, and Symbian.
We can use yum
or dnf
to install gmock
on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install gmock.
Install gmock on CentOS 7 Using yum
Update yum database with yum
using the following command.
After updating yum database, We can install gmock
using yum
by running the following command:
Install gmock on CentOS 7 Using dnf
If you don’t have dnf installed you can install DNF on CentOS 7 first.
Update yum database with dnf
using the following command.
After updating yum database, We can install gmock
using dnf
by running the following command:
How To Uninstall gmock on CentOS 7
To uninstall only the gmock
package we can use the following command:
References
Summary
In this tutorial we learn how to install gmock
on CentOS 7 using yum
and dnf
.