Skip to content

Instantly share code, notes, and snippets.

@yiidtw
Forked from Cartexius/install_gtest_ubuntu.md
Created July 31, 2019 02:32
Show Gist options
  • Save yiidtw/1e1fed867bc8b5d7d8140cc7272cbd8d to your computer and use it in GitHub Desktop.
Save yiidtw/1e1fed867bc8b5d7d8140cc7272cbd8d to your computer and use it in GitHub Desktop.
Install gtest in Ubuntu

Reference - https://www.eriksmistad.no/getting-started-with-google-test-on-ubuntu/

sudo apt-get install libgtest-dev

sudo apt-get install cmake # install cmake

cd /usr/src/gtest

sudo cmake CMakeLists.txt

sudo make

sudo cp *.a /usr/lib

sudo ln -s /usr/lib/libgtest.a /usr/local/lib/gtest/libgtest.a

sudo ln -s /usr/lib/libgtest_main.a /usr/local/lib/gtest/libgtest_main.a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment