GoogleTest installation at the APC2016 School

7-11 March 2016 - DESY, Hamburg, Germany - School web site

These quick instructions are meant to facilitate the installation of GoogleTest on the APC2016 students' laptops. They do not replace the more extensive instructions available in GoogleTest documentation.

red77.gif Create a directory where googletest will be installed and define an associated environment variable:

mkdir $HOME/Documents/g4dev/googletest
setenv GTESTPATH $HOME/Documents/g4dev/googletest/gtest_install

red77.gif Create include/ and lib/ directories within it:

mkdir $GTESTPATH/include
mkdir $GTTEST/INSTALL/lib

red77.gif Download googletest stable release (1.7.0)

red77.gif 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

red77.gif 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/

red77.gif Build with cmake:

mkdir mybuild
cd mybuild
cmake ${GTEST_DIR}  (to generate native build scripts)
make

red77.gif Install gtest in $GTESTPATH

cp -r ../include/gtest $GTESTPATH/include
cp -r lib*.a $GTESTPATH/lib


Back to APC2016 Lectures