summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
diff options
context:
space:
mode:
authorRobert Maynard <rmaynard@nvidia.com>2023-06-23 13:21:41 (GMT)
committerBrad King <brad.king@kitware.com>2023-06-23 16:14:09 (GMT)
commitf73ae7c510f30675ee3c6065b6411e19ca3ff04c (patch)
tree0a2853fbbb3d3d30887355224a21b8292fef5288 /Modules/Compiler
parentf58c7659d8652c1172fc15a0bae9d71ee477c1eb (diff)
downloadCMake-f73ae7c510f30675ee3c6065b6411e19ca3ff04c.zip
CMake-f73ae7c510f30675ee3c6065b6411e19ca3ff04c.tar.gz
CMake-f73ae7c510f30675ee3c6065b6411e19ca3ff04c.tar.bz2
NVHPC: Support nvfortran versions that don't support isystem
Fixes: #25019
Diffstat (limited to 'Modules/Compiler')
-rw-r--r--Modules/Compiler/NVHPC-Fortran.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/Compiler/NVHPC-Fortran.cmake b/Modules/Compiler/NVHPC-Fortran.cmake
index 59755b3..ca5f1b2 100644
--- a/Modules/Compiler/NVHPC-Fortran.cmake
+++ b/Modules/Compiler/NVHPC-Fortran.cmake
@@ -1,3 +1,7 @@
include(Compiler/PGI-Fortran)
include(Compiler/NVHPC)
__compiler_nvhpc(Fortran)
+if(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 21.7)
+ # Before NVHPC 21.7 nvfortran didn't support isystem
+ unset(CMAKE_INCLUDE_SYSTEM_FLAG_Fortran)
+endif()