summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRodrigo Queiro <rodrigoq@google.com>2018-01-16 08:20:08 (GMT)
committerRodrigo Queiro <overdrigzed@gmail.com>2018-01-16 16:06:15 (GMT)
commit3106945d8d3322e5cbd5658d482c9ffed2d892c0 (patch)
tree2f534e44686a2fd51b6c26410bf58d04304db111 /src
parent028d37889a1e80e8a07da1b8945ac706259e5fd8 (diff)
downloadglog-3106945d8d3322e5cbd5658d482c9ffed2d892c0.zip
glog-3106945d8d3322e5cbd5658d482c9ffed2d892c0.tar.gz
glog-3106945d8d3322e5cbd5658d482c9ffed2d892c0.tar.bz2
Add workaround for Bazel build on macOS
This works around https://github.com/bazelbuild/bazel/issues/3979, and so closes #282.
Diffstat (limited to 'src')
-rw-r--r--src/config.h.cmake.in12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/config.h.cmake.in b/src/config.h.cmake.in
index a946451..9d87d37 100644
--- a/src/config.h.cmake.in
+++ b/src/config.h.cmake.in
@@ -180,8 +180,20 @@
/* Version number of package */
#cmakedefine VERSION
+#ifdef GLOG_BAZEL_BUILD
+
+/* TODO(rodrigoq): remove this workaround once bazel#3979 is resolved:
+ * https://github.com/bazelbuild/bazel/issues/3979 */
+#define _START_GOOGLE_NAMESPACE_ namespace GOOGLE_NAMESPACE {
+
+#define _END_GOOGLE_NAMESPACE_ }
+
+#else
+
/* Stops putting the code inside the Google namespace */
#cmakedefine _END_GOOGLE_NAMESPACE_ ${_END_GOOGLE_NAMESPACE_}
/* Puts following code inside the Google namespace */
#cmakedefine _START_GOOGLE_NAMESPACE_ ${_START_GOOGLE_NAMESPACE_}
+
+#endif