Commit 55f8712e authored by Henry Weller's avatar Henry Weller
Browse files

etc/config/settings.*: Add -std=c++0x to formally enable support for of C++11 features

when building ThirdParty packages.
c++0x is used rather than c++11 to support gcc-4.5.?
parent cbf62fcb
......@@ -60,7 +60,7 @@ case Linux:
setenv WM_CC 'gcc'
setenv WM_CXX 'g++'
setenv WM_CFLAGS '-m32 -fPIC'
setenv WM_CXXFLAGS '-m32 -fPIC'
setenv WM_CXXFLAGS '-m32 -fPIC -std=c++0x'
setenv WM_LDFLAGS '-m32'
breaksw
......@@ -70,7 +70,7 @@ case Linux:
setenv WM_CC 'gcc'
setenv WM_CXX 'g++'
setenv WM_CFLAGS '-m64 -fPIC'
setenv WM_CXXFLAGS '-m64 -fPIC'
setenv WM_CXXFLAGS '-m64 -fPIC -std=c++0x'
setenv WM_LDFLAGS '-m64'
breaksw
......@@ -92,7 +92,7 @@ case Linux:
setenv WM_CC 'gcc'
setenv WM_CXX 'g++'
setenv WM_CFLAGS '-m64 -fPIC'
setenv WM_CXXFLAGS '-m64 -fPIC'
setenv WM_CXXFLAGS '-m64 -fPIC -std=c++0x'
setenv WM_LDFLAGS '-m64'
breaksw
......@@ -102,7 +102,7 @@ case Linux:
setenv WM_CC 'gcc'
setenv WM_CXX 'g++'
setenv WM_CFLAGS '-m64 -fPIC'
setenv WM_CXXFLAGS '-m64 -fPIC'
setenv WM_CXXFLAGS '-m64 -fPIC -std=c++0x'
setenv WM_LDFLAGS '-m64'
breaksw
......@@ -120,7 +120,7 @@ case SunOS:
setenv WM_CC 'gcc'
setenv WM_CXX 'g++'
setenv WM_CFLAGS '-mabi=64 -fPIC'
setenv WM_CXXFLAGS '-mabi=64 -fPIC'
setenv WM_CXXFLAGS '-mabi=64 -fPIC -std=c++0x'
setenv WM_LDFLAGS '-mabi=64 -G0'
breaksw
......@@ -187,10 +187,10 @@ if ( -d "${WM_DIR}" ) setenv PATH ${WM_DIR}:${PATH}
setenv PATH ${WM_PROJECT_DIR}/bin:${PATH}
# Add site-specific scripts to path - only if they exist
if ( -d "$siteDir/bin" ) then # generic
if ( -d "$siteDir/bin" ) then # Generic
_foamAddPath "$siteDir/bin"
endif
if ( -d "$siteDir/$WM_PROJECT_VERSION/bin" ) then # version-specific
if ( -d "$siteDir/$WM_PROJECT_VERSION/bin" ) then # Version-specific
_foamAddPath "$siteDir/$WM_PROJECT_VERSION/bin"
endif
unset siteDir
......@@ -216,61 +216,41 @@ endif
switch ("$foamCompiler")
case OpenFOAM:
case ThirdParty:
# Default versions of GMP, MPFR and MPC, overide as necessary
set gmp_version=gmp-5.1.2
set mpfr_version=mpfr-3.1.2
set mpc_version=mpc-1.0.1
switch ("$WM_COMPILER")
case Gcc:
case Gcc48:
set gcc_version=gcc-4.8.5
set gmp_version=gmp-5.1.2
set mpfr_version=mpfr-3.1.2
set mpc_version=mpc-1.0.1
breaksw
case Gcc45:
set gcc_version=gcc-4.5.4
set gmp_version=gmp-5.1.2
set mpfr_version=mpfr-3.1.2
set mpc_version=mpc-1.0.1
breaksw
case Gcc46:
set gcc_version=gcc-4.6.4
set gmp_version=gmp-5.1.2
set mpfr_version=mpfr-3.1.2
set mpc_version=mpc-1.0.1
breaksw
case Gcc47:
set gcc_version=gcc-4.7.4
set gmp_version=gmp-5.1.2
set mpfr_version=mpfr-3.1.2
set mpc_version=mpc-1.0.1
breaksw
case Gcc49:
set gcc_version=gcc-4.9.3
set gmp_version=gmp-5.1.2
set mpfr_version=mpfr-3.1.2
set mpc_version=mpc-1.0.1
breaksw
case Gcc51:
set gcc_version=gcc-5.1.0
set gmp_version=gmp-5.1.2
set mpfr_version=mpfr-3.1.2
set mpc_version=mpc-1.0.1
breaksw
case Gcc52:
set gcc_version=gcc-5.2.0
set gmp_version=gmp-5.1.2
set mpfr_version=mpfr-3.1.2
set mpc_version=mpc-1.0.1
breaksw
case Gcc53:
set gcc_version=gcc-5.3.0
set gmp_version=gmp-5.1.2
set mpfr_version=mpfr-3.1.2
set mpc_version=mpc-1.0.1
breaksw
case Clang:
# Using clang - not gcc
setenv WM_CC 'clang'
setenv WM_CXX 'clang++'
set clang_version=llvm-3.6.0
set clang_version=llvm-3.7.0
breaksw
default:
echo
......@@ -357,19 +337,6 @@ default:
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
# Communications library
# ~~~~~~~~~~~~~~~~~~~~~~
......
......@@ -68,7 +68,7 @@ case "$WM_ARCH" in
Linux)
WM_ARCH=linux
# compiler specifics
# Compiler specifics
case `uname -m` in
i686)
export WM_ARCH_OPTION=32
......@@ -81,7 +81,7 @@ Linux)
export WM_CC='gcc'
export WM_CXX='g++'
export WM_CFLAGS='-m32 -fPIC'
export WM_CXXFLAGS='-m32 -fPIC'
export WM_CXXFLAGS='-m32 -fPIC -std=c++0x'
export WM_LDFLAGS='-m32'
;;
64)
......@@ -90,7 +90,7 @@ Linux)
export WM_CC='gcc'
export WM_CXX='g++'
export WM_CFLAGS='-m64 -fPIC'
export WM_CXXFLAGS='-m64 -fPIC'
export WM_CXXFLAGS='-m64 -fPIC -std=c++0x'
export WM_LDFLAGS='-m64'
;;
*)
......@@ -111,7 +111,7 @@ Linux)
export WM_CC='gcc'
export WM_CXX='g++'
export WM_CFLAGS='-fPIC'
export WM_CXXFLAGS='-fPIC'
export WM_CXXFLAGS='-fPIC -std=c++0x'
export WM_LDFLAGS=
;;
......@@ -121,7 +121,7 @@ Linux)
export WM_CC='gcc'
export WM_CXX='g++'
export WM_CFLAGS='-m64 -fPIC'
export WM_CXXFLAGS='-m64 -fPIC'
export WM_CXXFLAGS='-m64 -fPIC -std=c++0x'
export WM_LDFLAGS='-m64'
;;
......@@ -131,7 +131,7 @@ Linux)
export WM_CC='gcc'
export WM_CXX='g++'
export WM_CFLAGS='-m64 -fPIC'
export WM_CXXFLAGS='-m64 -fPIC'
export WM_CXXFLAGS='-m64 -fPIC -std=c++0x'
export WM_LDFLAGS='-m64'
;;
......@@ -148,11 +148,11 @@ SunOS)
export WM_CC='gcc'
export WM_CXX='g++'
export WM_CFLAGS='-mabi=64 -fPIC'
export WM_CXXFLAGS='-mabi=64 -fPIC'
export WM_CXXFLAGS='-mabi=64 -fPIC -std=c++0x'
export WM_LDFLAGS='-mabi=64 -G0'
;;
*) # an unsupported operating system
*) # An unsupported operating system
/bin/cat <<USAGE 1>&2
Your "$WM_ARCH" operating system is not supported by this release
......@@ -211,12 +211,12 @@ export FOAM_RUN=$WM_PROJECT_USER_DIR/run
# Add OpenFOAM scripts to the path
export PATH=$WM_PROJECT_DIR/bin:$PATH
# add site-specific scripts to path - only if they exist
if [ -d "$siteDir/bin" ] # generic
# Add site-specific scripts to path - only if they exist
if [ -d "$siteDir/bin" ] # Generic
then
_foamAddPath "$siteDir/bin"
fi
if [ -d "$siteDir/$WM_PROJECT_VERSION/bin" ] # version-specific
if [ -d "$siteDir/$WM_PROJECT_VERSION/bin" ] # Version-specific
then
_foamAddPath "$siteDir/$WM_PROJECT_VERSION/bin"
fi
......@@ -242,60 +242,40 @@ fi
case "${foamCompiler}" in
OpenFOAM | ThirdParty)
# Default versions of GMP, MPFR and MPC, overide as necessary
gmp_version=gmp-5.1.2
mpfr_version=mpfr-3.1.2
mpc_version=mpc-1.0.1
case "$WM_COMPILER" in
Gcc | Gcc48)
gcc_version=gcc-4.8.5
gmp_version=gmp-5.1.2
mpfr_version=mpfr-3.1.2
mpc_version=mpc-1.0.1
;;
Gcc45)
gcc_version=gcc-4.5.4
gmp_version=gmp-5.1.2
mpfr_version=mpfr-3.1.2
mpc_version=mpc-1.0.1
;;
Gcc46)
gcc_version=gcc-4.6.4
gmp_version=gmp-5.1.2
mpfr_version=mpfr-3.1.2
mpc_version=mpc-1.0.1
;;
Gcc47)
gcc_version=gcc-4.7.4
gmp_version=gmp-5.1.2
mpfr_version=mpfr-3.1.2
mpc_version=mpc-1.0.1
;;
Gcc49)
gcc_version=gcc-4.9.3
gmp_version=gmp-5.1.2
mpfr_version=mpfr-3.1.2
mpc_version=mpc-1.0.1
;;
Gcc51)
gcc_version=gcc-5.1.0
gmp_version=gmp-5.1.2
mpfr_version=mpfr-3.1.2
mpc_version=mpc-1.0.1
;;
Gcc52)
gcc_version=gcc-5.2.0
gmp_version=gmp-5.1.2
mpfr_version=mpfr-3.1.2
mpc_version=mpc-1.0.1
;;
Gcc53)
gcc_version=gcc-5.3.0
gmp_version=gmp-5.1.2
mpfr_version=mpfr-3.1.2
mpc_version=mpc-1.0.1
;;
Clang)
# using clang - not gcc
# Using clang - not gcc
export WM_CC='clang'
export WM_CXX='clang++'
clang_version=llvm-3.6.0
clang_version=llvm-3.7.0
;;
*)
echo 1>&2
......@@ -380,20 +360,6 @@ system)
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
# Communications library
# ~~~~~~~~~~~~~~~~~~~~~~
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment