From: Rodrigo Queiro Date: Wed, 31 Jan 2018 13:00:25 +0000 (+0100) Subject: Allow using glog/stl_logging.h with Bazel X-Git-Tag: accepted/tizen/5.0/unified/20181102.024921~7 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Fglog.git;a=commitdiff_plain;h=bc9a491033ae63c8defd5d10c159ab123488dc20 Allow using glog/stl_logging.h with Bazel Fixes #289. --- diff --git a/bazel/example/main.cc b/bazel/example/main.cc index da5c020..ad15b14 100644 --- a/bazel/example/main.cc +++ b/bazel/example/main.cc @@ -1,5 +1,6 @@ #include #include +#include int main(int argc, char* argv[]) { // Initialize Google's logging library. @@ -10,5 +11,9 @@ int main(int argc, char* argv[]) { LOG(INFO) << "Hello, world!"; + // glog/stl_logging.h allows logging STL containers. + std::vector x {1, 2, 3}; + LOG(INFO) << "ABC, it's easy as " << x; + return 0; } diff --git a/bazel/glog.bzl b/bazel/glog.bzl index 95fd110..b33f1aa 100644 --- a/bazel/glog.bzl +++ b/bazel/glog.bzl @@ -89,7 +89,8 @@ def glog_library(namespace='google', with_gflags=1): cmd = r'''\ #!/bin/sh cat > $@ <<"EOF" -sed -e 's/@ac_cv_have_unistd_h@/1/g' \ +sed -e 's/@ac_cv_cxx_using_operator@/1/g' \ + -e 's/@ac_cv_have_unistd_h@/1/g' \ -e 's/@ac_cv_have_stdint_h@/1/g' \ -e 's/@ac_cv_have_systypes_h@/1/g' \ -e 's/@ac_cv_have_libgflags_h@/1/g' \