Commit 7e3202f4 authored by Mark Olesen's avatar Mark Olesen
Browse files

ENH: provide config setup for mesa with llvm (issue #1164)

- If using a non-clang compiler suite (gcc, intel, etc) the additional
  lbraries required for mesa with llvm pipelines may not be found.

  Provide a mesa_llvm configuration with in the 'vtk' config file.
  Can use the usual types of settings

     * mesa_llvm=llvm-4.0.1
     * mesa_llvm=none
     * mesa_llvm=system
parent 3d6d6df5
......@@ -2,7 +2,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2016-2017 OpenCFD Ltd.
# \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
......@@ -32,31 +32,37 @@
set vtk_version=VTK-8.2.0
set mesa_version=mesa-17.1.1
set mesa_llvm=none
setenv VTK_DIR $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$vtk_version
setenv MESA_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mesa_version
setenv VTK_DIR "$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$vtk_version"
setenv MESA_ARCH_PATH "$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mesa_version"
setenv LLVM_ARCH_PATH "$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH/$mesa_llvm"
# END OF (NORMAL) USER EDITABLE PART
#------------------------------------------------------------------------------
if ($?FOAM_VERBOSE && $?prompt) then
echo "Using vtk ($vtk_version) -> $VTK_DIR"
echo "Using mesa ($mesa_version) -> $MESA_ARCH_PATH"
echo "Using vtk"
echo " vtk ($vtk_version) $VTK_DIR"
echo " mesa ($mesa_version) $MESA_ARCH_PATH"
echo " llvm ($mesa_llvm) $LLVM_ARCH_PATH"
endif
# Set paths if binaries are present
if ( -r $VTK_DIR ) then
if ( -d "$VTK_DIR" ) then
# Uses lib/ and not lib64/
_foamAddLib $VTK_DIR/lib
_foamAddLib "$VTK_DIR/lib"
else
unset VTK_DIR
endif
if ( -r $MESA_ARCH_PATH ) then
_foamAddLib $MESA_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
if ( -d "$MESA_ARCH_PATH" ) then
_foamAddLibAuto "$LLVM_ARCH_PATH"
_foamAddLibAuto "$MESA_ARCH_PATH"
else
unset LLVM_ARCH_PATH
unset MESA_ARCH_PATH
endif
unset vtk_version mesa_version
unset vtk_version mesa_version mesa_llvm
#------------------------------------------------------------------------------
......@@ -2,7 +2,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2016-2017 OpenCFD Ltd.
# \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
......@@ -33,38 +33,44 @@
vtk_version=VTK-8.2.0
mesa_version=mesa-17.1.1
mesa_llvm=none
export VTK_DIR=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$vtk_version
export MESA_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mesa_version
export VTK_DIR="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$vtk_version"
export MESA_ARCH_PATH="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mesa_version"
export LLVM_ARCH_PATH="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH/$mesa_llvm"
# END OF (NORMAL) USER EDITABLE PART
#------------------------------------------------------------------------------
if [ -n "$FOAM_VERBOSE" ] && [ -n "$PS1" ]
then
echo "Using vtk ($vtk_version) -> $VTK_DIR" 1>&2
echo "Using mesa ($mesa_version) -> $MESA_ARCH_PATH" 1>&2
echo "Using vtk" 1>&2
echo " vtk ($vtk_version) $VTK_DIR" 1>&2
echo " mesa ($mesa_version) $MESA_ARCH_PATH" 1>&2
echo " llvm ($mesa_llvm) $LLVM_ARCH_PATH" 1>&2
fi
if command -v _foamAddLib > /dev/null 2>&1 # normal sourcing
then
# Set paths if binaries are present
if [ -r $VTK_DIR ]
if [ -d "$VTK_DIR" ]
then
# Uses lib/ and not lib64/
_foamAddLib $VTK_DIR/lib
_foamAddLib "$VTK_DIR/lib"
else
unset VTK_DIR
fi
if [ -r $MESA_ARCH_PATH ]
if [ -d "$MESA_ARCH_PATH" ]
then
_foamAddLib $MESA_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
_foamAddLibAuto "$LLVM_ARCH_PATH"
_foamAddLibAuto "$MESA_ARCH_PATH"
else
unset LLVM_ARCH_PATH
unset MESA_ARCH_PATH
fi
unset vtk_version mesa_version
unset vtk_version mesa_version mesa_llvm
fi
#------------------------------------------------------------------------------
Markdown is supported
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