Size: 1069
Comment:
|
Size: 1150
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
= Installing the Google C++ Testing Framework (gtest) = | #acl adpult:read,write Markus Naether:read,write All:read = Installing the Google C++ Testing Framework (gtest) globally = |
Line 12: | Line 14: |
wget https://github.com/google/googletest/archive/release-1.8.0.zip | wget https://github.com/google/googletest/archive/release-1.10.0.zip |
Line 15: | Line 17: |
'''Step 2:''' Unpack the archive, change to the corresponding directory and build the code from its source (this requires ''cmake''): | '''Step 3:''' Unpack the archive, change to the corresponding directory and build the code from its source (this requires ''cmake''): |
Line 18: | Line 20: |
unzip release-1.8.0.zip cd googletest-release-1.8.0/googletest |
unzip release-1.10.0.zip cd googletest-release-1.10.0/googletest |
Line 26: | Line 28: |
'''Step 3:''' Install the files, that is, copy them to the proper systems directories (you need to be root or have sudo rights for that): | '''Step 4:''' Install the files, that is, copy them to the proper systems directories (you need to be root or have sudo rights for that): |
Line 30: | Line 32: |
cp -a *.a /usr/local/lib | cp -a ./lib/*.a /usr/local/lib |
Line 33: | Line 35: |
'''(optional) Step 4:''' If the library is (still) not found by the compiler, you can run (as root or with sudo): | '''(optional) Step 5:''' If the library is (still) not found by the compiler, you can run (as root or with sudo): |
Line 39: | Line 41: |
'''(optional) Step 5:''' Clean up: | '''(optional) Step 6:''' Clean up: |
Line 43: | Line 45: |
rm -rf release-1.8.0.zip googletest-release-1.8.0 | rm -rf release-1.10.0.zip googletest-release-1.10.0 |
Installing the Google C++ Testing Framework (gtest) globally
Step 1: Change into the temporary directory, for example:
cd /tmp
Step 2: Download the latest (major) version from https://github.com/google/googletest/releases, for example:
wget https://github.com/google/googletest/archive/release-1.10.0.zip
Step 3: Unpack the archive, change to the corresponding directory and build the code from its source (this requires cmake):
unzip release-1.10.0.zip cd googletest-release-1.10.0/googletest mkdir bld cd bld cmake .. make
Step 4: Install the files, that is, copy them to the proper systems directories (you need to be root or have sudo rights for that):
cp -a -r ../include/gtest /usr/local/include/. cp -a ./lib/*.a /usr/local/lib
(optional) Step 5: If the library is (still) not found by the compiler, you can run (as root or with sudo):
ldconfig
(optional) Step 6: Clean up:
cd /tmp rm -rf release-1.10.0.zip googletest-release-1.10.0