-
Notifications
You must be signed in to change notification settings - Fork 15
Installing Google Test For Linux
GoogleTest is a framework based on the xUnit architecture. This framework is to write test for C++ code and valid for the most common platforms. Installation
To build and install goolge test library, first, we must install python and cmake in our development environment.
To obtain CMake follow this link to go to the CMake webpage. Once you reach de webpage, download the latest binary version for Linux.
If you nedd to download python, ho to python downloads web site. We need python 2.7 version.
Finally we have to download google test library sources. Downlaod them from the GoogleTest web site, clicking on "gtest-1.5.0.tar.gz". Store the download file in your computer.
Once the sources file is on your PC, open a shell console. Navigate to your download directory and extract the archive by typing:
tar -xzvf gtest-version.tar.gz
For build the library type:
cd gtest-version
mkdir mybuild
cd mybuild
cmake -G"Unix Makefiles" ..
make
Now, to install the built library type:
cp -r ../include/gtest /usr/local/include
cp lib*.a /usr/local/lib
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License