summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2013-02-27 17:49:18 +0000
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2013-02-27 17:49:18 +0000
commitb4dbe2896c589928ec0b5a65eff1c58283da1038 (patch)
tree814b29ae9b565a068ccf70131a8ffe296d9313fc /README
parenta032cfff4091c87a137a8d24ce2eb97c740cf4c8 (diff)
downloadgoogletest-b4dbe2896c589928ec0b5a65eff1c58283da1038.tar.gz
Adds -pthread and changes -I to -isystem in gtest's build instructions.
git-svn-id: http://googletest.googlecode.com/svn/trunk@638 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'README')
-rw-r--r--README19
1 files changed, 10 insertions, 9 deletions
diff --git a/README b/README
index 17bf72f..26f35a8 100644
--- a/README
+++ b/README
@@ -119,21 +119,22 @@ and Xcode) to compile
${GTEST_DIR}/src/gtest-all.cc
-with
-
- ${GTEST_DIR}/include and ${GTEST_DIR}
-
-in the header search path. Assuming a Linux-like system and gcc,
+with ${GTEST_DIR}/include in the system header search path and ${GTEST_DIR}
+in the normal header search path. Assuming a Linux-like system and gcc,
something like the following will do:
- g++ -I${GTEST_DIR}/include -I${GTEST_DIR} -c ${GTEST_DIR}/src/gtest-all.cc
+ g++ -isystem ${GTEST_DIR}/include -I${GTEST_DIR} \
+ -pthread -c ${GTEST_DIR}/src/gtest-all.cc
ar -rv libgtest.a gtest-all.o
+(We need -pthread as Google Test uses threads.)
+
Next, you should compile your test source file with
-${GTEST_DIR}/include in the header search path, and link it with gtest
-and any other necessary libraries:
+${GTEST_DIR}/include in the system header search path, and link it
+with gtest and any other necessary libraries:
- g++ -I${GTEST_DIR}/include path/to/your_test.cc libgtest.a -o your_test
+ g++ -isystem ${GTEST_DIR}/include -pthread path/to/your_test.cc libgtest.a \
+ -o your_test
As an example, the make/ directory contains a Makefile that you can
use to build Google Test on systems where GNU make is available