Question: Debian does not provide any precompiled packages for gTest anymore. They suggest you integrate the framework into your project's makefile. But I want to keep my makefile clean. How do I set up gTest like the former versions (<1.6.0), so that I can link against the library?

Answer: 
Let me answer this specifically for ubuntu users.
First start by installing the gtest development package.

```
sudo apt-get install libgtest-dev

```

Note that this package only install source files. You have to compile the code yourself to create the necessary library files. These source files should be located at /usr/src/gtest. Browse to this folder and use cmake to compile the library:

```
sudo apt-get install cmake # install cmake
cd /usr/src/gtest
sudo mkdir build
cd build
sudo cmake ..
sudo make
sudo make install

```

Now to compile your programs that uses gtest, you have to link it with:

```
-lgtest -lgtest_main -lpthread

```

This worked perfectly for me on Ubuntu 14.04LTS.
If you happen to be using CMake, you can use [`ExternalProject_Add`](http://www.cmake.org/cmake/help/v2.8.10/cmake.html#module:ExternalProject) as described [here](https://stackoverflow.com/a/9695234/424459).

This avoids you having to keep gtest source code in your repository, or installing it anywhere. It is downloaded and built in your build tree automatically.