How to install Google Test on mac

When I doing PMPP project, I need to use google test.

Because google have merge the googletest and googlemock, so the guide on website can be off work.


  • Download gtest on google test github page.

– Build gtest:

cd gtest

mkdir build

cd build

cmake ..


– Install gtest library

sudo cp -r ../googletest/include/gtest /usr/local/include/

sudo cp /googlemock/gtest/lib*.a /usr/local/lib