We use googletest for performing automated unit testing (usually via Travis CI). In order to avoid compilation issues, it is recommended to work with source files, i.e. not precompiled binaries, and build the final googletest libraries along with the user's project.
sudo apt install googletest
sudo apt install libgtest-dev