summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/Compiler/NVHPC.cmake2
-rw-r--r--Tests/RunCMake/CompileWarningAsError/WarningAsErrorOptions.cmake2
2 files changed, 2 insertions, 2 deletions
diff --git a/Modules/Compiler/NVHPC.cmake b/Modules/Compiler/NVHPC.cmake
index 21d0665..957dacd 100644
--- a/Modules/Compiler/NVHPC.cmake
+++ b/Modules/Compiler/NVHPC.cmake
@@ -13,5 +13,5 @@ include(Compiler/PGI)
macro(__compiler_nvhpc lang)
# Logic specific to NVHPC.
set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ")
- set(CMAKE_${lang}_COMPILE_OPTIONS_WARNING_AS_ERROR "--Werror all-warnings")
+ set(CMAKE_${lang}_COMPILE_OPTIONS_WARNING_AS_ERROR "-Werror all-warnings")
endmacro()
diff --git a/Tests/RunCMake/CompileWarningAsError/WarningAsErrorOptions.cmake b/Tests/RunCMake/CompileWarningAsError/WarningAsErrorOptions.cmake
index 590c8a4..d8770e1 100644
--- a/Tests/RunCMake/CompileWarningAsError/WarningAsErrorOptions.cmake
+++ b/Tests/RunCMake/CompileWarningAsError/WarningAsErrorOptions.cmake
@@ -1,7 +1,7 @@
# add compile options to warning_options to ensure unused-function throws a warning
# if warning_options is NOT DEFINED, assume compiler doesn't support warning as error
macro(get_warning_options warning_options lang)
- if (CMAKE_${lang}_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang|XLClang|IBMClang|LCC|IntelLLVM)$")
+ if (CMAKE_${lang}_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang|XLClang|IBMClang|LCC|IntelLLVM|NVHPC)$")
set(${warning_options} "-Wall")
elseif (CMAKE_${lang}_COMPILER_ID STREQUAL "MSVC"
OR (CMAKE_${lang}_COMPILER_ID STREQUAL "Intel" AND CMAKE_${lang}_SIMULATE_ID MATCHES "MSVC"))