ENH: etc: added CGAL setup

This commit is contained in:
mattijs 2014-01-28 12:54:14 +00:00
parent f8d44081f9
commit f14b5e2456
9 changed files with 106 additions and 66 deletions

View File

@ -7,7 +7,7 @@ wmake all extrude
wmake all extrude2DMesh
wmake all snappyHexMesh
if [ -d "$CGAL_ARCH_PATH" ]
if [ -n "$CGAL_ARCH_PATH" ]
then
wmake libso foamyHexMesh/conformalVoronoiMesh
wmake all foamyHexMesh

View File

@ -2,7 +2,7 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
if [ -d "$CGAL_ARCH_PATH" ]
if [ -n "$CGAL_ARCH_PATH" ]
then
wmake libso conformalVoronoiMesh
wmake

View File

@ -2,7 +2,7 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
if [ -d "$CGAL_ARCH_PATH" ]
if [ -n "$CGAL_ARCH_PATH" ]
then
#- Already built by ../Allwake
#wmake libso ../foamyHexMesh/conformalVoronoiMesh

View File

@ -214,6 +214,7 @@ _foamSource $WM_PROJECT_DIR/etc/config/aliases.sh
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/paraview.sh`
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/ensight.sh`
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/gperftools.sh`
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/CGAL.sh`
# Clean environment paths again. Only remove duplicates

50
etc/config/CGAL.csh Normal file
View File

@ -0,0 +1,50 @@
#----------------------------------*-sh-*--------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
# \\/ M anipulation |
#------------------------------------------------------------------------------
# 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
# config/CGAL.csh
#
# Description
# Setup file for CGAL (& boost) include/libraries.
# Sourced from OpenFOAM-<VERSION>/etc/cshrc
##------------------------------------------------------------------------------
set boost_version=boost-system
set cgal_version=CGAL-4.3
setenv BOOST_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$boost_version
setenv CGAL_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cgal_version
if ($?FOAM_VERBOSE && $?prompt) then
echo "Using CGAL and boost"
echo " $cgal_version at $CGAL_ARCH_PATH"
echo " $boost_version at $BOOST_ARCH_PATH"
endif
if ( -d "$BOOST_ARCH_PATH" ) then
_foamAddLib $BOOST_ARCH_PATH/lib
endif
unset boost_version cgal_version
# -----------------------------------------------------------------------------

51
etc/config/CGAL.sh Normal file
View File

@ -0,0 +1,51 @@
#----------------------------------*-sh-*--------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
# \\/ M anipulation |
#------------------------------------------------------------------------------
# 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
# config/CGAL.sh
#
# Description
# Setup file for CGAL (& boost) include/libraries.
# Sourced from OpenFOAM-<VERSION>/etc/bashrc
#------------------------------------------------------------------------------
boost_version=boost-system
cgal_version=CGAL-4.3
export BOOST_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$boost_version
export CGAL_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cgal_version
if [ "$FOAM_VERBOSE" -a "$PS1" ]
then
echo "Using CGAL and boost"
echo " $cgal_version at $CGAL_ARCH_PATH"
echo " $boost_version at $BOOST_ARCH_PATH"
fi
if ( -d "$BOOST_ARCH_PATH" ) then
_foamAddLib $BOOST_ARCH_PATH/lib
fi
unset boost_version cgal_version
# -----------------------------------------------------------------------------

View File

@ -353,35 +353,6 @@ if ( $?WM_CXXFLAGS ) then
endif
# boost and CGAL
# ~~~~~~~~~~~~~~
set boost_version=boost_1_45_0
set cgal_version=CGAL-4.0
setenv BOOST_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$boost_version
setenv CGAL_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cgal_version
# enabled if CGAL is available
if ($?FOAM_VERBOSE && $?prompt) then
echo "Checking for"
echo " $cgal_version at $CGAL_ARCH_PATH"
echo " $boost_version at $BOOST_ARCH_PATH"
endif
if ( -d "$CGAL_ARCH_PATH" ) then
if ( -d "$BOOST_ARCH_PATH" ) then
_foamAddLib $BOOST_ARCH_PATH/lib
else
unsetenv BOOST_ARCH_PATH
endif
_foamAddLib $CGAL_ARCH_PATH/lib
else
unsetenv BOOST_ARCH_PATH CGAL_ARCH_PATH MPFR_ARCH_PATH GMP_ARCH_PATH
endif
unset boost_version cgal_version
# Communications library
# ~~~~~~~~~~~~~~~~~~~~~~

View File

@ -370,40 +370,6 @@ then
fi
# boost and CGAL
# ~~~~~~~~~~~~~~
boost_version=boost_1_45_0
cgal_version=CGAL-4.0
export BOOST_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$boost_version
export CGAL_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cgal_version
# enabled if CGAL is available
if [ "$FOAM_VERBOSE" -a "$PS1" ]
then
echo "Checking for"
echo " $cgal_version at $CGAL_ARCH_PATH"
echo " $boost_version at $BOOST_ARCH_PATH"
fi
if [ -d "$CGAL_ARCH_PATH" ]
then
if [ -d "$BOOST_ARCH_PATH" ]
then
_foamAddLib $BOOST_ARCH_PATH/lib
_foamAddLib $BOOST_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
else
unset BOOST_ARCH_PATH
fi
_foamAddLib $CGAL_ARCH_PATH/lib
_foamAddLib $CGAL_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
else
unset BOOST_ARCH_PATH CGAL_ARCH_PATH MPFR_ARCH_PATH GMP_ARCH_PATH
fi
unset boost_version cgal_version
# Communications library
# ~~~~~~~~~~~~~~~~~~~~~~

View File

@ -203,6 +203,7 @@ _foamSource $WM_PROJECT_DIR/etc/config/aliases.csh
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/paraview.csh`
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/ensight.csh`
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/CGAL.csh`
# Clean environment paths again. Only remove duplicates