 Create a directory
where googletest will be installed and define an associated environment variable:
 Create a directory
where googletest will be installed and define an associated environment variable: Create include/
and
lib/ directories within it:
 Create include/
and
lib/ directories within it:
mkdir
$GTESTPATH/include
mkdir
$GTTEST/INSTALL/lib
 Download
googletest stable release (1.7.0)
 Download
googletest stable release (1.7.0)
 Unzip/untar what you
downloaded and go into the googletest release directory:
 Unzip/untar what you
downloaded and go into the googletest release directory:
tar -xvzf
gtest-1.7.0.tar.gz
unzip
gtest-1.7.0.zip
cd
$HOME/Documents/g4dev/googletest/1.7.0/googletest-release-1.7.0
 Define an
environment
variable for the directory where googletest source
code is:
 Define an
environment
variable for the directory where googletest source
code is:
setenv GTEST_DIR $HOME/Documents/g4dev/googletest/1.7.0/googletest-release-1.7.0/
 Build with cmake:
 Build with cmake:
mkdir mybuild
cd mybuild
cmake
${GTEST_DIR}  (to generate native build scripts)
make
 Install gtest in
$GTESTPATH
 Install gtest in
$GTESTPATH
cp -r
../include/gtest $GTESTPATH/include
cp -r lib*.a
$GTESTPATH/lib