- Get the download zip from the website: http://code.google.com/p/googlemock/downloads/list
- Unzip this to a directory, say
${GMOCK_ROOT}
:
cd ${GMOCK_ROOT}
mkdir build
cd build
g++ -I../gtest/include -I../gtest -I../include -I.. -c ../gtest/src/gtest-all.cc
g++ -I../gtest/include -I../gtest -I../include -I.. -c ../gmock/src/gmock-all.cc
ar -rv libgmock.a gtest-all.o gmock-all.o
thanks for your comment!
This gist is obsolete, googletest and googlemock both in the one repository now.
And this repo contains CMake file for simple building: