-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
4 changed files
with
46 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
diff --git a/bazel/glog.bzl b/bazel/glog.bzl | ||
index dacd934..d7b3d78 100644 | ||
--- a/bazel/glog.bzl | ||
+++ b/bazel/glog.bzl | ||
@@ -53,7 +53,6 @@ def glog_library(namespace = "google", with_gflags = 1, **kwargs): | ||
) | ||
|
||
common_copts = [ | ||
- "-std=c++14", | ||
"-DGLOG_BAZEL_BUILD", | ||
# Inject a C++ namespace. | ||
"-DGOOGLE_NAMESPACE='%s'" % namespace, | ||
@@ -145,7 +144,13 @@ def glog_library(namespace = "google", with_gflags = 1, **kwargs): | ||
], | ||
}) | ||
|
||
+ c14_opts = ["-std=c++14"] | ||
+ c17_opts = ["-std=c++17"] | ||
+ | ||
final_lib_copts = select({ | ||
+ "@bazel_tools//src/conditions:windows": c17_opts, | ||
+ "//conditions:default": c14_opts, | ||
+ }) + select({ | ||
"@bazel_tools//src/conditions:windows": common_copts + windows_only_copts, | ||
"@bazel_tools//src/conditions:darwin": common_copts + linux_or_darwin_copts + darwin_only_copts, | ||
"@bazel_tools//src/conditions:freebsd": common_copts + linux_or_darwin_copts + freebsd_only_copts, |