From 4f806b59d266c772f51b220aa54abb6e09861b3c Mon Sep 17 00:00:00 2001 From: Kristina Chodorow Date: Mon, 18 May 2015 15:35:17 +0000 Subject: Fix paths in gtest example The zip file actually contains a gtest-1.7.0 directory that everything is under. -- MOS_MIGRATED_REVID=93890530 --- site/docs/cpp.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'site/docs') 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"], -- cgit v1.2.3