summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Maynard <rmaynard@nvidia.com>2021-05-18 15:30:01 (GMT)
committerRobert Maynard <rmaynard@nvidia.com>2021-05-18 15:30:01 (GMT)
commit521cfc38a3faa9239015ceb8281800aa14a215cb (patch)
tree923a872363858269a78367f5263b2612d2652a86
parent1ad4501ae97fb6c6deab096ff0ac7e03d554e26d (diff)
downloadCMake-521cfc38a3faa9239015ceb8281800aa14a215cb.zip
CMake-521cfc38a3faa9239015ceb8281800aa14a215cb.tar.gz
CMake-521cfc38a3faa9239015ceb8281800aa14a215cb.tar.bz2
NVHPC: Support explicit language flags
-rw-r--r--Modules/Compiler/NVHPC-C.cmake4
-rw-r--r--Modules/Compiler/NVHPC-CXX.cmake4
2 files changed, 8 insertions, 0 deletions
diff --git a/Modules/Compiler/NVHPC-C.cmake b/Modules/Compiler/NVHPC-C.cmake
index d16c72b..72c2656 100644
--- a/Modules/Compiler/NVHPC-C.cmake
+++ b/Modules/Compiler/NVHPC-C.cmake
@@ -1,3 +1,7 @@
include(Compiler/PGI-C)
include(Compiler/NVHPC)
+
+# Needed so that we support `LANGUAGE` property correctly
+set(CMAKE_C_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -x c)
+
__compiler_nvhpc(C)
diff --git a/Modules/Compiler/NVHPC-CXX.cmake b/Modules/Compiler/NVHPC-CXX.cmake
index 18ace8b..ac75b53 100644
--- a/Modules/Compiler/NVHPC-CXX.cmake
+++ b/Modules/Compiler/NVHPC-CXX.cmake
@@ -1,3 +1,7 @@
include(Compiler/PGI-CXX)
include(Compiler/NVHPC)
+
+# Needed so that we support `LANGUAGE` property correctly
+set(CMAKE_CXX_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -x c++)
+
__compiler_nvhpc(CXX)