Gtest for MacOS



How To Install Gtest On Mac Os X

xcode-select –install

sudo xcodebuild -license accept

//Restart Terminal

ruby -e “$(curl -fsSL

brew install cmake

cd ~/
git clone https://github.com/google/googletest.git
cd googletest
mkdir install
cd install
cmake
make

sudo make install #installs Google Testecho “export

source ~/.bash_profile

// Done

Codetacular

g++ -std=c++0x tests.cpp -lgtest -lgtest_main -pthread -o test

6 Comments