aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/docs
diff options
context:
space:
mode:
authorGravatar Kristina Chodorow <kchodorow@google.com>2015-05-18 15:35:17 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2015-05-18 20:02:13 +0000
commit4f806b59d266c772f51b220aa54abb6e09861b3c (patch)
treeb18e5efec58bdcca90cc5215a14e85c9e2c5c193 /site/docs
parent45a24691406c683cfab5bed30f25de8ef2a8300b (diff)
Fix paths in gtest example
The zip file actually contains a gtest-1.7.0 directory that everything is under. -- MOS_MIGRATED_REVID=93890530
Diffstat (limited to 'site/docs')
-rw-r--r--site/docs/cpp.md18
1 files changed, 9 insertions, 9 deletions
diff --git a/site/docs/cpp.md b/site/docs/cpp.md
index 9dd2e52520..a927d917b9 100644
--- a/site/docs/cpp.md
+++ b/site/docs/cpp.md
@@ -177,10 +177,10 @@ Then create _gtest.BUILD_, a BUILD file to use to compile Google Test.
Google Test has several "special" requirements that make its `cc_library` rule
more complicated:
-* _src/gtest-all.cc_ `#include`s all of the other files in _src/_, so we
- need to exclude it from the compile or we'll get link errors for duplicate
- symbols.
-* It uses header files that relative to the _include/_ directory
+* _gtest-1.7.0/src/gtest-all.cc_ `#include`s all of the other files in
+ _gtest-1.7.0/src/_, so we need to exclude it from the compile or we'll get
+ link errors for duplicate symbols.
+* It uses header files that relative to the _gtest-1.7.0/include/_ directory
(`"gtest/gtest.h"`), so we must add that directory the includes.
* It uses "private" header files in src/, so we add "." to the includes so it
can `#include "src/gtest-internal-inl.h"`.
@@ -192,13 +192,13 @@ The final rule looks like this:
cc_library(
name = "main",
srcs = glob(
- ["src/*.cc"],
- exclude = ["src/gtest-all.cc"]
+ ["gtest-1.7.0/src/*.cc"],
+ exclude = ["gtest-1.7.0/src/gtest-all.cc"]
),
- hdrs = glob(["include/**/*.h"]),
+ hdrs = glob(["gtest-1.7.0/include/**/*.h"]),
includes = [
- ".",
- "include"
+ "gtest-1.7.0",
+ "gtest-1.7.0/include"
],
linkopts = ["-pthread"],
visibility = ["//visibility:public"],