mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
12
wmake/rules/linux64Nvidia/c
Normal file
12
wmake/rules/linux64Nvidia/c
Normal 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
|
||||
14
wmake/rules/linux64Nvidia/c++
Normal file
14
wmake/rules/linux64Nvidia/c++
Normal 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++
|
||||
2
wmake/rules/linux64Nvidia/c++Debug
Normal file
2
wmake/rules/linux64Nvidia/c++Debug
Normal file
@ -0,0 +1,2 @@
|
||||
c++DBUG = -g -DFULLDEBUG
|
||||
c++OPT = -O0
|
||||
2
wmake/rules/linux64Nvidia/c++Opt
Normal file
2
wmake/rules/linux64Nvidia/c++Opt
Normal file
@ -0,0 +1,2 @@
|
||||
c++DBUG =
|
||||
c++OPT = -O3
|
||||
2
wmake/rules/linux64Nvidia/c++Prof
Normal file
2
wmake/rules/linux64Nvidia/c++Prof
Normal file
@ -0,0 +1,2 @@
|
||||
c++DBUG = -pg
|
||||
c++OPT = -O2
|
||||
2
wmake/rules/linux64Nvidia/cDebug
Normal file
2
wmake/rules/linux64Nvidia/cDebug
Normal file
@ -0,0 +1,2 @@
|
||||
cDBUG = -g -DFULLDEBUG
|
||||
cOPT = -O0
|
||||
2
wmake/rules/linux64Nvidia/cOpt
Normal file
2
wmake/rules/linux64Nvidia/cOpt
Normal file
@ -0,0 +1,2 @@
|
||||
cDBUG =
|
||||
cOPT = -O3
|
||||
2
wmake/rules/linux64Nvidia/cProf
Normal file
2
wmake/rules/linux64Nvidia/cProf
Normal file
@ -0,0 +1,2 @@
|
||||
cDBUG = -pg
|
||||
cOPT = -O2
|
||||
13
wmake/rules/linux64Nvidia/general
Normal file
13
wmake/rules/linux64Nvidia/general
Normal 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++
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
3
wmake/rules/linux64Nvidia/mplibOPENMPI
Normal file
3
wmake/rules/linux64Nvidia/mplibOPENMPI
Normal 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
|
||||
Reference in New Issue
Block a user