diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2022-08-15 08:36:56 -0400 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2022-08-15 08:38:07 -0400 |
commit | a31e2859a8229af3574ab2e931624b7c15551fb8 (patch) | |
tree | 9c785d5bce7f0e5f8f542da848a4570b0bc67b3a | |
parent | 853bb192c407f5d9e75a5fd55cc089151530cbd3 (diff) | |
download | llvm-a31e2859a8229af3574ab2e931624b7c15551fb8.tar.gz |
Silence MSVC codecvt deprecation warnings
This silences warnings about use of deprecated codecvt functionality
after the switch to build with C++17.
-rw-r--r-- | third-party/benchmark/src/sysinfo.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/third-party/benchmark/src/sysinfo.cc b/third-party/benchmark/src/sysinfo.cc index 87dcfb466619..d9bd651f8a4d 100644 --- a/third-party/benchmark/src/sysinfo.cc +++ b/third-party/benchmark/src/sysinfo.cc @@ -12,6 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +#if defined(_MSC_VER) +// FIXME: This must be defined before any other includes to disable deprecation +// warnings for use of codecvt from C++17. We should remove our reliance on +// the deprecated functionality instead. +#define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING +#endif + #include "internal_macros.h" #ifdef BENCHMARK_OS_WINDOWS |