1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-17 07:11:52 +08:00
Files
CMake/Modules/Compiler/NVHPC.cmake
Robert Maynard 9d40f01442 NVHPC: Use -Werror for COMPILE_OPTIONS_WARNING_AS_ERROR
The previously-used `-Werror all-warnings` is not supported by
the NVHPC suite of compilers.  This previously worked since `-Werror`
was being used and `all-warnings` was being excluded.

We thought this was the correct syntax due to incorrect documentation
about `-Werror`, which stated the argument should be space-separated,
while it should actually be separated with `=` or `,`.

Issue: #24665
2023-04-25 11:16:26 -04:00

18 lines
486 B
CMake

# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# This module is shared by multiple languages; use include blocker.
if(__COMPILER_NVHPC)
return()
endif()
set(__COMPILER_NVHPC 1)
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")
endmacro()