Skip to content

Commit

Permalink
add nvhpc compiler support (flame#719)
Browse files Browse the repository at this point in the history
Add detection of the NVIDIA nvhpc compiler (`nvc`) in `configure`, and adjust some warning options in `config.mk`. Currently, no specific options for `nvc` have been added in the relevant configurations so it may not be usable without further tweaks.
  • Loading branch information
ajaypanyala authored and ct-clmsn committed Jul 29, 2023
1 parent 0d5a11c commit 3b6dd7c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,11 @@ CWARNFLAGS :=
# Disable unused function warnings and stop compiling on first error for
# all compilers that accept such options: gcc, clang, and icc.
ifneq ($(CC_VENDOR),ibm)
ifneq ($(CC_VENDOR),nvc)
CWARNFLAGS += -Wall -Wno-unused-function -Wfatal-errors
else
CWARNFLAGS += -Wall -Wno-unused-function
endif
endif

# Disable tautological comparision warnings in clang.
Expand Down
6 changes: 5 additions & 1 deletion config/generic/make_defs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ else
ifeq ($(CC_VENDOR),clang)
CKVECFLAGS :=
else
$(error gcc, icc, or clang is required for this configuration.)
ifeq ($(CC_VENDOR),nvc)
CKVECFLAGS :=
else
$(error gcc, icc, nvc, or clang is required for this configuration.)
endif
endif
endif
endif
Expand Down
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -1545,7 +1545,7 @@ get_compiler_version()
# The last part ({ read first rest ; echo $first ; }) is a workaround
# to OS X's egrep only returning the first match.
cc_vendor=$(echo "${vendor_string}" |
grep -oE 'icc|gcc|clang|emcc|pnacl|IBM|oneAPI|crosstool-NG|GCC' |
grep -oE 'icc|gcc|clang|nvc|emcc|pnacl|IBM|oneAPI|crosstool-NG|GCC' |
{ read -r first rest ; echo "${first}"; })

# AOCC version strings contain both "clang" and "AOCC" substrings, and
Expand Down

0 comments on commit 3b6dd7c

Please sign in to comment.