Skip to content

Commit 45564e4

Browse files
committed
Updated googletest instructions with current build and install instructions
1 parent cf691cd commit 45564e4

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

cpp/README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,27 @@ $ export LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH
5151

5252
**googletest test framework**:
5353

54-
To download, build and install see [googletest](https://code.google.com/p/googletest/). The following provides a quick summary of the key steps to build and install googletest in your home directory:
54+
To download, build and install see [googletest](https://github.com/google/googletest/). The following provides a quick summary of the key steps to build and install googletest in your home directory:
5555

5656
```
57-
$ wget https://googletest.googlecode.com/files/gtest-1.7.0.zip
58-
$ unzip gtest-1.7.0.zip
59-
$ cd gtest-1.7.0/
60-
$ ./configure --prefix=$HOME --with-pthreads=no
57+
$ wget https://github.com/google/googletest/archive/release-1.7.0.zip
58+
$ unzip release-1.7.0.zip
59+
$ cd googletest-release-1.7.0/
60+
$ mkdir build
61+
$ cd build
62+
$ cmake .. -Dgtest_disable_pthreads=ON
6163
$ make
62-
$ cp -r include/gtest $HOME/include
63-
$ cp lib/.libs/* $HOME/lib/
64+
$ mkdir $HOME/include
65+
$ cp -r ../include/gtest/ $HOME/include/
66+
$ mkdir $HOME/lib
67+
$ cp libgtest*a $HOME/lib/
6468
$ ls $HOME/include/gtest
6569
gtest-death-test.h gtest-param-test.h.pump gtest-spi.h
6670
gtest.h gtest_pred_impl.h gtest-test-part.h
6771
gtest-message.h gtest-printers.h gtest-typed-test.h
6872
gtest-param-test.h gtest_prod.h internal
6973
$ ls $HOME/lib
70-
libgtest.a libgtest_main.a libgtest_main.so libgtest.so
71-
libgtest.la libgtest_main.la libgtest_main.so.0 libgtest.so.0
72-
libgtest.lai libgtest_main.lai libgtest_main.so.0.0.0 libgtest.so.0.0.0
74+
libgtest.a libgtest_main.a
7375
$ export CPLUS_INCLUDE_PATH=$HOME/include:$CPLUS_INCLUDE_PATH
7476
$ export LIBRARY_PATH=$HOME/lib:$LIBRARY_PATH
7577
$ export LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH

0 commit comments

Comments
 (0)