summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-04-26 14:24:20 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-04-26 14:24:28 (GMT)
commit1ac569fdaa2ddd44dff0ce54aa16c12015b135e0 (patch)
treecd3dae05140819fd5d168d1a9e1ea1caccd138ed /Modules
parent3f3c3d3e71f5aa4840932a96cd9ab90cf22cc9d3 (diff)
parent9d40f01442ba244573a010ed015c0e0ef9a8ab83 (diff)
downloadCMake-1ac569fdaa2ddd44dff0ce54aa16c12015b135e0.zip
CMake-1ac569fdaa2ddd44dff0ce54aa16c12015b135e0.tar.gz
CMake-1ac569fdaa2ddd44dff0ce54aa16c12015b135e0.tar.bz2
Merge topic 'fortran_ninja_compile_as_warning'
9d40f01442 NVHPC: Use -Werror for COMPILE_OPTIONS_WARNING_AS_ERROR Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8415
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Compiler/NVHPC-Fortran.cmake2
-rw-r--r--Modules/Compiler/NVHPC.cmake2
2 files changed, 2 insertions, 2 deletions
diff --git a/Modules/Compiler/NVHPC-Fortran.cmake b/Modules/Compiler/NVHPC-Fortran.cmake
index 5c06457..879c140 100644
--- a/Modules/Compiler/NVHPC-Fortran.cmake
+++ b/Modules/Compiler/NVHPC-Fortran.cmake
@@ -1,4 +1,4 @@
include(Compiler/PGI-Fortran)
include(Compiler/NVHPC)
__compiler_nvhpc(Fortran)
-set(CMAKE_Fortran_PREPROCESS_SOURCE_EXCLUDE_FLAGS_REGEX "(^| )-Werror +[a-z][a-z-]+( |$)")
+set(CMAKE_Fortran_PREPROCESS_SOURCE_EXCLUDE_FLAGS_REGEX "(^| )-Werror([=,][a-z][a-z-]+)?( |$)")
diff --git a/Modules/Compiler/NVHPC.cmake b/Modules/Compiler/NVHPC.cmake
index 474ac80..0593456 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")
endmacro()