Add gendir to the include path so that building with bazel doesn't
authorMing Zhao <mzhao@luminatewireless.com>
Tue, 10 May 2016 21:42:11 +0000 (14:42 -0700)
committerMing Zhao <mzhao@luminatewireless.com>
Tue, 10 May 2016 21:42:11 +0000 (14:42 -0700)
complain config.h can't be found.

BUILD

diff --git a/BUILD b/BUILD
index d5fc59b..c9dc00d 100644 (file)
--- a/BUILD
+++ b/BUILD
@@ -20,6 +20,10 @@ cc_library(
     ],
     hdrs = ["gflags.h"],
     copts = [
+        # The config.h gets generated to the package directory of
+        # GENDIR, and we don't want to put it into the includes
+        # otherwise the dependent may pull it in by accident.
+        "-I$(GENDIR)/" + PACKAGE_NAME,
         "-Wno-sign-compare",
         "-DHAVE_STDINT_H",
         "-DHAVE_SYS_TYPES_H",