ENH: add in C++0x support for linux64Gcc - for testing purposes

This commit is contained in:
Mark Olesen
2010-11-17 11:15:23 +01:00
parent 758c7fec4f
commit 6260055989
12 changed files with 92 additions and 3 deletions

View File

@ -90,17 +90,20 @@ switch ("$compilerInstall")
case OpenFOAM: case OpenFOAM:
switch ("$WM_COMPILER") switch ("$WM_COMPILER")
case Gcc: case Gcc:
case Gcc++0x:
set gcc_version=gcc-4.4.3 set gcc_version=gcc-4.4.3
set gmp_version=gmp-5.0.1 set gmp_version=gmp-5.0.1
set mpfr_version=mpfr-2.4.2 set mpfr_version=mpfr-2.4.2
breaksw breaksw
case Gcc45: case Gcc45:
case Gcc45++0x:
set gcc_version=gcc-4.5.0 set gcc_version=gcc-4.5.0
set gmp_version=gmp-5.0.1 set gmp_version=gmp-5.0.1
set mpfr_version=mpfr-2.4.2 set mpfr_version=mpfr-2.4.2
set mpc_version=mpc-0.8.1 set mpc_version=mpc-0.8.1
breaksw breaksw
case Gcc44: case Gcc44:
case Gcc44++0x:
set gcc_version=gcc-4.4.3 set gcc_version=gcc-4.4.3
set gmp_version=gmp-5.0.1 set gmp_version=gmp-5.0.1
set mpfr_version=mpfr-2.4.2 set mpfr_version=mpfr-2.4.2
@ -190,6 +193,18 @@ case OpenFOAM:
endsw 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 # boost and CGAL
# ~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~

View File

@ -111,18 +111,18 @@ unset MPFR_ARCH_PATH
case "${compilerInstall:-OpenFOAM}" in case "${compilerInstall:-OpenFOAM}" in
OpenFOAM) OpenFOAM)
case "$WM_COMPILER" in case "$WM_COMPILER" in
Gcc) Gcc | Gcc++0x)
gcc_version=gcc-4.4.3 gcc_version=gcc-4.4.3
gmp_version=gmp-5.0.1 gmp_version=gmp-5.0.1
mpfr_version=mpfr-2.4.2 mpfr_version=mpfr-2.4.2
;; ;;
Gcc45) Gcc45 | Gcc45++0x)
gcc_version=gcc-4.5.0 gcc_version=gcc-4.5.0
gmp_version=gmp-5.0.1 gmp_version=gmp-5.0.1
mpfr_version=mpfr-2.4.2 mpfr_version=mpfr-2.4.2
mpc_version=mpc-0.8.1 mpc_version=mpc-0.8.1
;; ;;
Gcc44) Gcc44 | Gcc44++0x)
gcc_version=gcc-4.4.3 gcc_version=gcc-4.4.3
gmp_version=gmp-5.0.1 gmp_version=gmp-5.0.1
mpfr_version=mpfr-2.4.2 mpfr_version=mpfr-2.4.2
@ -213,6 +213,19 @@ OpenFOAM)
esac 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 # boost and CGAL
# ~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~

View 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

View 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

View File

@ -0,0 +1,2 @@
c++DBUG = -ggdb3 -DFULLDEBUG
c++OPT = -O0 -fdefault-inline

View File

@ -0,0 +1,3 @@
#c++DBUG = -O0 -DFULLDEBUG -g
c++DBUG =
c++OPT = -O3

View File

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

View File

@ -0,0 +1,2 @@
cDBUG = -ggdb -DFULLDEBUG
cOPT = -O1 -fdefault-inline -finline-functions

View File

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

View File

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

View 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++

View File

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