From 4050b4bda5a3dd479901c44427032101eeb0dfa6 Mon Sep 17 00:00:00 2001 From: Henrique Bucher <11621271+HFTrader@users.noreply.github.com> Date: Wed, 8 Mar 2023 03:50:30 -0600 Subject: [PATCH] Fix build break with nvc++ when -Werror is ON (#1569) Build breaks when -Werror is turned on because of unhandled cases of inocuous/pedantic warnings. Adopted the same solution as for Intel PGI compiler - just disable -Werror manually, unless BENCHMARK_FORCE_WERROR is enabled. Fixes #1556. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e7701e3..5442bf76 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,9 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "PGI") # PGC++ maybe reporting false positives. set(BENCHMARK_ENABLE_WERROR OFF) endif() +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "NVHPC") + set(BENCHMARK_ENABLE_WERROR OFF) +endif() if(BENCHMARK_FORCE_WERROR) set(BENCHMARK_ENABLE_WERROR ON) endif(BENCHMARK_FORCE_WERROR)