From ea58955dda6452307ce43a5beef0a466b49f1bef Mon Sep 17 00:00:00 2001 From: Nikita Shulga Date: Sat, 19 Nov 2022 01:13:08 +0000 Subject: [PATCH] Move bazel to c++17 (#89297) Splitting out various smaller pieces from https://github.com/pytorch/pytorch/pull/85969 Pull Request resolved: https://github.com/pytorch/pytorch/pull/89297 Approved by: https://github.com/huydhn --- .bazelrc | 2 +- third_party/gloo.BUILD | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.bazelrc b/.bazelrc index ce8406b58aa..f8ff2215f2d 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,4 +1,4 @@ -build --cxxopt=--std=c++14 +build --cxxopt=--std=c++17 build --copt=-I. # Bazel does not support including its cc_library targets as system # headers. We work around this for generated code diff --git a/third_party/gloo.BUILD b/third_party/gloo.BUILD index 3f623e54e6a..e9deaa13fc6 100644 --- a/third_party/gloo.BUILD +++ b/third_party/gloo.BUILD @@ -75,8 +75,7 @@ cc_library( ] ) + if_cuda(glob(["gloo/cuda*.cc"])), copts = [ - "-std=gnu++11", - "-std=c++11", + "-std=c++17", ], visibility = ["//visibility:public"], deps = [":gloo_headers"] + if_cuda(