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.
This commit is contained in:
Mark Olesen
2021-10-19 20:09:31 +02:00
parent 8eab653117
commit c2697f466d
31 changed files with 204 additions and 43 deletions

View File

@ -0,0 +1,12 @@
include $(GENERAL_RULES)/Nvidia/c
cARCH = -m64
# Compile option is non-mandatory, but must be non-empty
sinclude $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
cFLAGS = $(cARCH) $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@
include $(GENERAL_RULES)/Nvidia/link-c

View File

@ -0,0 +1,14 @@
include $(GENERAL_RULES)/Nvidia/c++
c++ARCH = -m64
include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
c++FLAGS = $(c++ARCH) $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
cxxtoo = $(Ctoo)
cctoo = $(Ctoo)
cpptoo = $(Ctoo)
include $(GENERAL_RULES)/Nvidia/link-c++

View File

@ -0,0 +1,2 @@
c++DBUG = -g -DFULLDEBUG
c++OPT = -O0

View File

@ -0,0 +1,2 @@
c++DBUG =
c++OPT = -O3

View File

@ -0,0 +1,2 @@
c++DBUG = -pg
c++OPT = -O2

View File

@ -0,0 +1,2 @@
cDBUG = -g -DFULLDEBUG
cOPT = -O0

View File

@ -0,0 +1,2 @@
cDBUG =
cOPT = -O3

View File

@ -0,0 +1,2 @@
cDBUG = -pg
cOPT = -O2

View File

@ -0,0 +1,13 @@
CPP = cpp -traditional-cpp $(GFLAGS)
include $(GENERAL_RULES)/standard
## include $(GENERAL_RULES)/Pgi/openmp
ifneq (,$(findstring ~openmp,$(WM_COMPILE_CONTROL)))
include $(GENERAL_RULES)/no-openmp
endif
include $(DEFAULT_RULES)/c
include $(DEFAULT_RULES)/c++
# -----------------------------------------------------------------------------

View File

@ -0,0 +1,3 @@
PFLAGS = -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) -L$(MPI_ARCH_PATH)/lib -lmpi