We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When build glog on Windows you get the following warning when using Visual Studio 2022: unknown option '-std=c++14' for Windows builds.
unknown option '-std=c++14' for Windows builds
The reason for this is here.
Abseil has a good way to handle flags for different compilers - could copied here - something like this:
in configure_copts.bzl:
configure_copts.bzl
GLOG_MSVC_FLAGS = [ "/std:c++20", ] GLOG_GCC_FLAGS = [ "-std=c++23", ] GLOG_CLANG_FLAGS = [ "-std=c++20", ] GLOG_DEFAULT_COPTS = select({ "//glog:msvc_compiler": GLOG_MSVC_FLAGS, "//glog:gcc_compiler": GLOG_GCC_FLAGS, "//glog:clang_compiler": GLOG_CLANG_FLAGS, "//conditions:default": GLOG_GCC_FLAGS, })
In BUILD file:
config_setting( name = "msvc_compiler", flag_values = { "@bazel_tools//tools/cpp:compiler": "msvc-cl", }, visibility = [":__subpackages__"], ) config_setting( name = "gcc_compiler", flag_values = { "@bazel_tools//tools/cpp:compiler": "gcc", }, visibility = [":__subpackages__"], ) config_setting( name = "clang_compiler", flag_values = { "@bazel_tools//tools/cpp:compiler": "clang", }, visibility = [":__subpackages__"], )
The text was updated successfully, but these errors were encountered:
@Vertexwahn I don't have a way to test this but happy to review a PR if you'd like to assign yourself and try out that suggestion.
Sorry, something went wrong.
If absl have a precedent for testing this with the Bazel CI that would be ideal: https://github.com/google/glog/blob/master/.bazelci/presubmit.yml
drigz
No branches or pull requests
When build glog on Windows you get the following warning when using Visual Studio 2022:
unknown option '-std=c++14' for Windows builds
.The reason for this is here.
Abseil has a good way to handle flags for different compilers - could copied here - something like this:
in
configure_copts.bzl
:In BUILD file:
The text was updated successfully, but these errors were encountered: