mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add in C++0x support for linux64Gcc - for testing purposes
This commit is contained in:
@ -90,17 +90,20 @@ switch ("$compilerInstall")
|
||||
case OpenFOAM:
|
||||
switch ("$WM_COMPILER")
|
||||
case Gcc:
|
||||
case Gcc++0x:
|
||||
set gcc_version=gcc-4.4.3
|
||||
set gmp_version=gmp-5.0.1
|
||||
set mpfr_version=mpfr-2.4.2
|
||||
breaksw
|
||||
case Gcc45:
|
||||
case Gcc45++0x:
|
||||
set gcc_version=gcc-4.5.0
|
||||
set gmp_version=gmp-5.0.1
|
||||
set mpfr_version=mpfr-2.4.2
|
||||
set mpc_version=mpc-0.8.1
|
||||
breaksw
|
||||
case Gcc44:
|
||||
case Gcc44++0x:
|
||||
set gcc_version=gcc-4.4.3
|
||||
set gmp_version=gmp-5.0.1
|
||||
set mpfr_version=mpfr-2.4.2
|
||||
@ -190,6 +193,18 @@ case OpenFOAM:
|
||||
endsw
|
||||
|
||||
|
||||
#
|
||||
# add c++0x flags for external programs
|
||||
#
|
||||
if ( $?WM_CXXFLAGS ) then
|
||||
switch ("$WM_COMPILER")
|
||||
case Gcc*++0x:
|
||||
setenv WM_CXXFLAGS "$WM_CXXFLAGS -std=c++0x"
|
||||
breaksw
|
||||
endsw
|
||||
endif
|
||||
|
||||
|
||||
# boost and CGAL
|
||||
# ~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@ -111,18 +111,18 @@ unset MPFR_ARCH_PATH
|
||||
case "${compilerInstall:-OpenFOAM}" in
|
||||
OpenFOAM)
|
||||
case "$WM_COMPILER" in
|
||||
Gcc)
|
||||
Gcc | Gcc++0x)
|
||||
gcc_version=gcc-4.4.3
|
||||
gmp_version=gmp-5.0.1
|
||||
mpfr_version=mpfr-2.4.2
|
||||
;;
|
||||
Gcc45)
|
||||
Gcc45 | Gcc45++0x)
|
||||
gcc_version=gcc-4.5.0
|
||||
gmp_version=gmp-5.0.1
|
||||
mpfr_version=mpfr-2.4.2
|
||||
mpc_version=mpc-0.8.1
|
||||
;;
|
||||
Gcc44)
|
||||
Gcc44 | Gcc44++0x)
|
||||
gcc_version=gcc-4.4.3
|
||||
gmp_version=gmp-5.0.1
|
||||
mpfr_version=mpfr-2.4.2
|
||||
@ -213,6 +213,19 @@ OpenFOAM)
|
||||
esac
|
||||
|
||||
|
||||
#
|
||||
# add c++0x flags for external programs
|
||||
#
|
||||
if [ -n "$WM_CXXFLAGS" ]
|
||||
then
|
||||
case "$WM_COMPILER" in
|
||||
Gcc*++0x)
|
||||
WM_CXXFLAGS="$WM_CXXFLAGS -std=c++0x"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
||||
# boost and CGAL
|
||||
# ~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
16
wmake/rules/linux64Gcc++0x/c
Normal file
16
wmake/rules/linux64Gcc++0x/c
Normal file
@ -0,0 +1,16 @@
|
||||
.SUFFIXES: .c .h
|
||||
|
||||
cWARN = -Wall
|
||||
|
||||
cc = gcc -m64
|
||||
|
||||
include $(RULES)/c$(WM_COMPILE_OPTION)
|
||||
|
||||
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
|
||||
|
||||
ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
|
||||
|
||||
LINK_LIBS = $(cDBUG)
|
||||
|
||||
LINKLIBSO = $(cc) -shared
|
||||
LINKEXE = $(cc) -Xlinker --add-needed -Xlinker -z -Xlinker nodefs
|
||||
21
wmake/rules/linux64Gcc++0x/c++
Normal file
21
wmake/rules/linux64Gcc++0x/c++
Normal file
@ -0,0 +1,21 @@
|
||||
.SUFFIXES: .C .cxx .cc .cpp
|
||||
|
||||
c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor
|
||||
|
||||
CC = g++ -m64 -std=c++0x
|
||||
|
||||
include $(RULES)/c++$(WM_COMPILE_OPTION)
|
||||
|
||||
ptFLAGS = -DNoRepository -ftemplate-depth-60
|
||||
|
||||
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
|
||||
|
||||
Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
|
||||
cxxtoo = $(Ctoo)
|
||||
cctoo = $(Ctoo)
|
||||
cpptoo = $(Ctoo)
|
||||
|
||||
LINK_LIBS = $(c++DBUG)
|
||||
|
||||
LINKLIBSO = $(CC) $(c++FLAGS) -shared
|
||||
LINKEXE = $(CC) $(c++FLAGS) -Xlinker --add-needed
|
||||
2
wmake/rules/linux64Gcc++0x/c++Debug
Normal file
2
wmake/rules/linux64Gcc++0x/c++Debug
Normal file
@ -0,0 +1,2 @@
|
||||
c++DBUG = -ggdb3 -DFULLDEBUG
|
||||
c++OPT = -O0 -fdefault-inline
|
||||
3
wmake/rules/linux64Gcc++0x/c++Opt
Normal file
3
wmake/rules/linux64Gcc++0x/c++Opt
Normal file
@ -0,0 +1,3 @@
|
||||
#c++DBUG = -O0 -DFULLDEBUG -g
|
||||
c++DBUG =
|
||||
c++OPT = -O3
|
||||
2
wmake/rules/linux64Gcc++0x/c++Prof
Normal file
2
wmake/rules/linux64Gcc++0x/c++Prof
Normal file
@ -0,0 +1,2 @@
|
||||
c++DBUG = -pg
|
||||
c++OPT = -O2
|
||||
2
wmake/rules/linux64Gcc++0x/cDebug
Normal file
2
wmake/rules/linux64Gcc++0x/cDebug
Normal file
@ -0,0 +1,2 @@
|
||||
cDBUG = -ggdb -DFULLDEBUG
|
||||
cOPT = -O1 -fdefault-inline -finline-functions
|
||||
2
wmake/rules/linux64Gcc++0x/cOpt
Normal file
2
wmake/rules/linux64Gcc++0x/cOpt
Normal file
@ -0,0 +1,2 @@
|
||||
cDBUG =
|
||||
cOPT = -O3
|
||||
2
wmake/rules/linux64Gcc++0x/cProf
Normal file
2
wmake/rules/linux64Gcc++0x/cProf
Normal file
@ -0,0 +1,2 @@
|
||||
cDBUG = -pg
|
||||
cOPT = -O2
|
||||
8
wmake/rules/linux64Gcc++0x/general
Normal file
8
wmake/rules/linux64Gcc++0x/general
Normal file
@ -0,0 +1,8 @@
|
||||
CPP = cpp -traditional-cpp $(GFLAGS)
|
||||
|
||||
PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl
|
||||
|
||||
include $(GENERAL_RULES)/standard
|
||||
|
||||
include $(RULES)/c
|
||||
include $(RULES)/c++
|
||||
3
wmake/rules/linux64Gcc++0x/mplibHPMPI
Normal file
3
wmake/rules/linux64Gcc++0x/mplibHPMPI
Normal file
@ -0,0 +1,3 @@
|
||||
PFLAGS =
|
||||
PINC = -I$(MPI_ARCH_PATH)/include -D_MPICC_H
|
||||
PLIBS = -L$(MPI_ARCH_PATH)/lib/linux_amd64 -lmpi
|
||||
Reference in New Issue
Block a user