Note: CMake and google test library are required
(1) Download gtest gtest-1.7.0.zip and unzip
(2) Build gtest:
cd gtest-1.7.0
mkdir build
cd build
cmake ..
make
(3) Install gtest library
sudo cp -r ../include/gtest /usr/local/include/
sudo cp lib*.a /usr/local/lib
mkdir build
cd build
cmake ..
make