This page discusses how to set up Google Test for Magic Lantern code targeting the Linux platform.
Instructions for building and installing Google Test can be found in the README file (https://github.com/google/googletest/blob/master/googletest/README.md). The information in this wiki page supplements that document.
Make sure that 'git' is installed since the source will be retrieved from GitHub.
$ sudo apt-get install git
Retrieve the source:
$ git clone https://github.com/google/googletest.git
Change your working directory to where you cloned the git repository and create the envrironment variable GTEST_DIR:
$ cd googletest
$ export GTEST_DIR=pwd
/googletest
$ cd $GTEST_DIR
Build the Google Test library, libgtest.a:
$ cd $GTEST_DIR
$ g++ -isystem ${GTEST_DIR}/include -I${GTEST_DIR} -pthread -c ${GTEST_DIR}/src/gtest-all.cc
$ ar -rv libgtest.a gtest-all.o