From eaa51cbc9de8e06c5714d1347dec25dea389950b Mon Sep 17 00:00:00 2001
From: easy <g-easy@users.noreply.github.com>
Date: Fri, 10 Aug 2018 16:28:58 +1000
Subject: [PATCH] Add explicit check that we're building with bazel.

---
 include/grpcpp/opencensus.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/grpcpp/opencensus.h b/include/grpcpp/opencensus.h
index 29b221f7674..07a13339863 100644
--- a/include/grpcpp/opencensus.h
+++ b/include/grpcpp/opencensus.h
@@ -19,6 +19,10 @@
 #ifndef GRPCPP_OPENCENSUS_H
 #define GRPCPP_OPENCENSUS_H
 
+#ifndef GRPC_BAZEL_BUILD
+#error OpenCensus for gRPC is only supported when building with bazel.
+#endif
+
 #include "opencensus/trace/span.h"
 
 namespace grpc {