openfoam/wmake/rules/General/Nvidia/c++
Mark Olesen c2697f466d CONFIG: update c++ standard, some compiler rules (partially addresses #2209)
- migrate to c++14 for most compilers *except* gcc.
  There are still many systems in use with gcc-4.8.5, which does not
  support c++14.

- initial rules for nvidia compilers (pgi is will soon be defunct).
  Not fully tested...

CONFIG: provide fallback value for the user directory name

- in containers may have an unset USER env variable.
  Default to 'user' to prevent ugly looking directory names.
2021-10-21 15:31:05 +02:00

38 lines
1.1 KiB
Plaintext

#------------------------------------------------------------------------------
# Nvidia compilers
#------------------------------------------------------------------------------
SUFFIXES += .C .cc .cpp .cxx
CC = nvc++ -std=c++14
c++ARCH =
c++DBUG =
c++OPT = -O2
ptFLAGS = -DNoRepository
# - Standard warnings
# - Less restrictive warnings (may be needed for flex++, CGAL, etc.)
c++WARN = \
-Wall -Wextra \
--diag_suppress=111,128,177,185,612,998,1098 \
--display_error_number \
$(FOAM_EXTRA_CXXFLAGS)
c++LESSWARN =
# Warnings
# --------
# Run with --display_error_number to get numbers
# and --diag_suppress=XXX to suppress
#
#111-D: statement is unreachable
#128-D: loop is not reachable
#177-D: function was declared but never referenced
#185-D: dynamic initialization in unreachable code
#612-D: overloaded virtual function ... is only partially overridden
#998-D: function XX is hidden by YY -- virtual function override intended?
#1098-D: unknown attribute "fallthrough"
#
#------------------------------------------------------------------------------