From 92624714c4ab99fd14631c7a8b45d5efc02cdff9 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Tue, 2 Nov 2021 09:57:55 -0400 Subject: NVHPC: Support SYSTEM include directories Fixed #22834 --- Modules/Compiler/NVHPC.cmake | 1 + Tests/IncludeDirectories/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/Modules/Compiler/NVHPC.cmake b/Modules/Compiler/NVHPC.cmake index 7048670..b51bb43 100644 --- a/Modules/Compiler/NVHPC.cmake +++ b/Modules/Compiler/NVHPC.cmake @@ -12,4 +12,5 @@ include(Compiler/PGI) macro(__compiler_nvhpc lang) # Logic specific to NVHPC. + set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ") endmacro() diff --git a/Tests/IncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/CMakeLists.txt index 4c488e6..f00565e 100644 --- a/Tests/IncludeDirectories/CMakeLists.txt +++ b/Tests/IncludeDirectories/CMakeLists.txt @@ -3,6 +3,7 @@ project(IncludeDirectories) if (((CMAKE_C_COMPILER_ID STREQUAL GNU AND CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.4) OR (CMAKE_C_COMPILER_ID STREQUAL Clang AND NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") + OR CMAKE_C_COMPILER_ID STREQUAL NVHPC OR CMAKE_C_COMPILER_ID STREQUAL AppleClang OR ("x${CMAKE_C_COMPILER_ID}" STREQUAL "xMSVC" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "19.29.30036.3" AND -- cgit v0.12