diff --git a/etc/settings.csh b/etc/settings.csh index e1884cd1c3bd8e4de18a08a3c793fec6859f729b..f3bec0d91565f395ec53ce26a59d4f453ac40181 100644 --- a/etc/settings.csh +++ b/etc/settings.csh @@ -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 # ~~~~~~~~~~~~~~ diff --git a/etc/settings.sh b/etc/settings.sh index 5b2f516505da5d27f3040ceeb20f8ee152b4e3f1..785c3f97dde17d3c10cc6f8bef3eb5cf69b93faf 100644 --- a/etc/settings.sh +++ b/etc/settings.sh @@ -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 # ~~~~~~~~~~~~~~ diff --git a/wmake/rules/linux64Gcc++0x/c b/wmake/rules/linux64Gcc++0x/c new file mode 100644 index 0000000000000000000000000000000000000000..f4114be3143d1210ffea500a2b361008910abed0 --- /dev/null +++ b/wmake/rules/linux64Gcc++0x/c @@ -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 diff --git a/wmake/rules/linux64Gcc++0x/c++ b/wmake/rules/linux64Gcc++0x/c++ new file mode 100644 index 0000000000000000000000000000000000000000..4f858ff338c4d4f3e09d279d7168d9a368f05902 --- /dev/null +++ b/wmake/rules/linux64Gcc++0x/c++ @@ -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 diff --git a/wmake/rules/linux64Gcc++0x/c++Debug b/wmake/rules/linux64Gcc++0x/c++Debug new file mode 100644 index 0000000000000000000000000000000000000000..19bdb9c3346fc7a69380dfedd6e7911fe220a965 --- /dev/null +++ b/wmake/rules/linux64Gcc++0x/c++Debug @@ -0,0 +1,2 @@ +c++DBUG = -ggdb3 -DFULLDEBUG +c++OPT = -O0 -fdefault-inline diff --git a/wmake/rules/linux64Gcc++0x/c++Opt b/wmake/rules/linux64Gcc++0x/c++Opt new file mode 100644 index 0000000000000000000000000000000000000000..3363be80905262684d0f126daa1cd6388231184d --- /dev/null +++ b/wmake/rules/linux64Gcc++0x/c++Opt @@ -0,0 +1,3 @@ +#c++DBUG = -O0 -DFULLDEBUG -g +c++DBUG = +c++OPT = -O3 diff --git a/wmake/rules/linux64Gcc++0x/c++Prof b/wmake/rules/linux64Gcc++0x/c++Prof new file mode 100644 index 0000000000000000000000000000000000000000..3bda4dad55e898a8198f6e8bfe21e8d829d7230a --- /dev/null +++ b/wmake/rules/linux64Gcc++0x/c++Prof @@ -0,0 +1,2 @@ +c++DBUG = -pg +c++OPT = -O2 diff --git a/wmake/rules/linux64Gcc++0x/cDebug b/wmake/rules/linux64Gcc++0x/cDebug new file mode 100644 index 0000000000000000000000000000000000000000..72b638f458220e329d52b59e3566a3c807101f9d --- /dev/null +++ b/wmake/rules/linux64Gcc++0x/cDebug @@ -0,0 +1,2 @@ +cDBUG = -ggdb -DFULLDEBUG +cOPT = -O1 -fdefault-inline -finline-functions diff --git a/wmake/rules/linux64Gcc++0x/cOpt b/wmake/rules/linux64Gcc++0x/cOpt new file mode 100644 index 0000000000000000000000000000000000000000..17318709f1fa39e6bf89cbe87778bc6fa459de17 --- /dev/null +++ b/wmake/rules/linux64Gcc++0x/cOpt @@ -0,0 +1,2 @@ +cDBUG = +cOPT = -O3 diff --git a/wmake/rules/linux64Gcc++0x/cProf b/wmake/rules/linux64Gcc++0x/cProf new file mode 100644 index 0000000000000000000000000000000000000000..ca3ac9bf5f0cd61fe99e0f05fa1bd4bdf9fa6cf7 --- /dev/null +++ b/wmake/rules/linux64Gcc++0x/cProf @@ -0,0 +1,2 @@ +cDBUG = -pg +cOPT = -O2 diff --git a/wmake/rules/linux64Gcc++0x/general b/wmake/rules/linux64Gcc++0x/general new file mode 100644 index 0000000000000000000000000000000000000000..809751cd0afab5ce33a04b3c72e266b16b7cc267 --- /dev/null +++ b/wmake/rules/linux64Gcc++0x/general @@ -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++ diff --git a/wmake/rules/linux64Gcc++0x/mplibHPMPI b/wmake/rules/linux64Gcc++0x/mplibHPMPI new file mode 100644 index 0000000000000000000000000000000000000000..574492a236a32f7d87d00bf0e3507a5ac8e54f55 --- /dev/null +++ b/wmake/rules/linux64Gcc++0x/mplibHPMPI @@ -0,0 +1,3 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include -D_MPICC_H +PLIBS = -L$(MPI_ARCH_PATH)/lib/linux_amd64 -lmpi