Files
openfoam/etc/config.sh/compiler
Mark Olesen b970ba0901 ENH: minor improvements to environment
- handle sourcing bashrc with a relative path (issue #383)
- handle sourcing from bash and zsh.
  Still need manual intervention when sourcing dash, sh, or ksh.
- replace grep in etc/cshrc with sed only
- logical instead of physical path for WM_PROJECT_DIR (issue #431).
  Doesn't seem to be possible for csh/tcsh.

  * Continue using physical locations when comparing directories,
    but not for the top-level FOAM_INST_DIR, WM_PROJECT_DIR.

- relocate WM_CC, WM_CXX overrides from etc/config.*/compiler
  to etc/config.*/settings to ensure that they are left untouched
  when etc/config.sh/compiler is sourced while making third-party
  packages (eg, gcc, llvm, CGAL).

- provide fallback FOAM_TUTORIALS setting in RunFunctions

STYLE: remove "~OpenFOAM" fallback as being too rare, non-obvious
2017-03-20 08:57:12 +01:00

95 lines
2.7 KiB
Bash

#----------------------------------*-sh-*--------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
#
# OpenFOAM is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
#
# File
# etc/config.sh/compiler
#
# Description
# Startup file for custom compiler versions for OpenFOAM
# Sourced from OpenFOAM-<VERSION>/etc/config.sh/settings
#
#------------------------------------------------------------------------------
case "$WM_COMPILER_TYPE" in
ThirdParty)
# Default versions of GMP, MPFR and MPC, override as necessary
gmp_version=gmp-system
mpfr_version=mpfr-system
mpc_version=mpc-system
case "$WM_COMPILER" in
Gcc | Gcc48)
gcc_version=gcc-4.8.5
;;
Gcc49)
gcc_version=gcc-4.9.3
;;
Gcc51)
gcc_version=gcc-5.1.0
;;
Gcc52)
gcc_version=gcc-5.2.0
;;
Gcc53)
gcc_version=gcc-5.3.0
;;
Gcc54)
gcc_version=gcc-5.4.0
;;
Gcc61)
gcc_version=gcc-6.1.0
;;
Gcc62)
gcc_version=gcc-6.2.0
;;
Gcc63)
gcc_version=gcc-6.3.0
;;
Clang)
clang_version=llvm-3.7.1
;;
Clang38)
clang_version=llvm-3.8.1
;;
Clang39)
clang_version=llvm-3.9.1
;;
Clang40)
clang_version=llvm-4.0.0
;;
*)
/bin/cat << UNKNOWN_COMPILER 1>&2
===============================================================================
Warning in $WM_PROJECT_DIR/etc/config.sh/compiler:
Unknown ThirdParty compiler type/version - '$WM_COMPILER'
Please check your settings
===============================================================================
UNKNOWN_COMPILER
;;
esac
;;
esac
#------------------------------------------------------------------------------