mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
paraview build - add -abspath/-envpath options
This commit is contained in:
@ -65,7 +65,8 @@ usage() {
|
||||
|
||||
usage: ${0##*/} [OPTION]
|
||||
options:
|
||||
-fast skip configure for repeated builds - use with caution
|
||||
-fast for repeated builds (-make -abspath -install) *use with caution*
|
||||
-abspath suppress the '-envpath' stage of changing the cmake files
|
||||
-mpi with mpi (if not already enabled)
|
||||
-python with python (if not already enabled)
|
||||
-mesa with mesa (if not already enabled)
|
||||
@ -76,6 +77,7 @@ For finer control, the build stages can be also selected individually
|
||||
(mutually exclusive)
|
||||
-config
|
||||
-make
|
||||
-envpath
|
||||
-install
|
||||
|
||||
Build and install $PARAVIEW_SRC
|
||||
@ -94,6 +96,7 @@ case "$Script" in *-mesa*) WITH_MESA=ON;; esac
|
||||
|
||||
runCONFIG=true
|
||||
runMAKE=true
|
||||
runENVPATH=true
|
||||
runINSTALL=true
|
||||
|
||||
# parse options
|
||||
@ -106,27 +109,42 @@ do
|
||||
-config) # stage 1: config only
|
||||
runCONFIG=true
|
||||
runMAKE=false
|
||||
runENVPATH=false
|
||||
runINSTALL=false
|
||||
shift
|
||||
;;
|
||||
-make) # stage 2: make only
|
||||
runCONFIG=false
|
||||
runMAKE=true
|
||||
runENVPATH=false
|
||||
runINSTALL=false
|
||||
shift
|
||||
;;
|
||||
-install) # stage 3: install only
|
||||
-envpath) # stage 3: alter paths to use env variables
|
||||
runCONFIG=false
|
||||
runMAKE=false
|
||||
runENVPATH=true
|
||||
runINSTALL=false
|
||||
shift
|
||||
;;
|
||||
-install) # stage 4: install only
|
||||
runCONFIG=false
|
||||
runMAKE=false
|
||||
runENVPATH=false
|
||||
runINSTALL=true
|
||||
shift
|
||||
;;
|
||||
-fast) # shortcut for rebuild
|
||||
runCONFIG=false
|
||||
runMAKE=true
|
||||
runENVPATH=false
|
||||
runINSTALL=true
|
||||
shift
|
||||
;;
|
||||
-abspath) # suppress changing the cmake files
|
||||
runENVPATH=false
|
||||
shift
|
||||
;;
|
||||
-mpi)
|
||||
WITH_MPI=ON
|
||||
shift
|
||||
@ -162,6 +180,7 @@ getPaths # discover where things are or should be put
|
||||
# ~~~~~~~~~~~~~~~~~
|
||||
[ $runCONFIG = true ] && configParaView
|
||||
[ $runMAKE = true ] && makeParaView
|
||||
[ $runENVPATH = true ] && fixCMakeFiles
|
||||
[ $runINSTALL = true ] && installParaView
|
||||
|
||||
echo "done"
|
||||
|
||||
@ -65,7 +65,8 @@ usage() {
|
||||
|
||||
usage: ${0##*/} [OPTION]
|
||||
options:
|
||||
-fast skip configure for repeated builds - use with caution
|
||||
-fast for repeated builds (-make -abspath -install) *use with caution*
|
||||
-abspath suppress the '-envpath' stage of changing the cmake files
|
||||
-mpi with mpi (if not already enabled)
|
||||
-python with python (if not already enabled)
|
||||
-mesa with mesa (if not already enabled)
|
||||
@ -76,6 +77,7 @@ For finer control, the build stages can be also selected individually
|
||||
(mutually exclusive)
|
||||
-config
|
||||
-make
|
||||
-envpath
|
||||
-install
|
||||
|
||||
Build and install $PARAVIEW_SRC
|
||||
@ -94,6 +96,7 @@ case "$Script" in *-mesa*) WITH_MESA=ON;; esac
|
||||
|
||||
runCONFIG=true
|
||||
runMAKE=true
|
||||
runENVPATH=true
|
||||
runINSTALL=true
|
||||
|
||||
# parse options
|
||||
@ -106,27 +109,42 @@ do
|
||||
-config) # stage 1: config only
|
||||
runCONFIG=true
|
||||
runMAKE=false
|
||||
runENVPATH=false
|
||||
runINSTALL=false
|
||||
shift
|
||||
;;
|
||||
-make) # stage 2: make only
|
||||
runCONFIG=false
|
||||
runMAKE=true
|
||||
runENVPATH=false
|
||||
runINSTALL=false
|
||||
shift
|
||||
;;
|
||||
-install) # stage 3: install only
|
||||
-envpath) # stage 3: alter paths to use env variables
|
||||
runCONFIG=false
|
||||
runMAKE=false
|
||||
runENVPATH=true
|
||||
runINSTALL=false
|
||||
shift
|
||||
;;
|
||||
-install) # stage 4: install only
|
||||
runCONFIG=false
|
||||
runMAKE=false
|
||||
runENVPATH=false
|
||||
runINSTALL=true
|
||||
shift
|
||||
;;
|
||||
-fast) # shortcut for rebuild
|
||||
runCONFIG=false
|
||||
runMAKE=true
|
||||
runENVPATH=false
|
||||
runINSTALL=true
|
||||
shift
|
||||
;;
|
||||
-abspath) # suppress changing the cmake files
|
||||
runENVPATH=false
|
||||
shift
|
||||
;;
|
||||
-mpi)
|
||||
WITH_MPI=ON
|
||||
shift
|
||||
@ -162,6 +180,7 @@ getPaths # discover where things are or should be put
|
||||
# ~~~~~~~~~~~~~~~~~
|
||||
[ $runCONFIG = true ] && configParaView
|
||||
[ $runMAKE = true ] && makeParaView
|
||||
[ $runENVPATH = true ] && fixCMakeFiles
|
||||
[ $runINSTALL = true ] && installParaView
|
||||
|
||||
echo "done"
|
||||
|
||||
@ -266,11 +266,17 @@ fixHardLinks()
|
||||
}
|
||||
|
||||
|
||||
# This triggers a partial rebuild, but might let us find our files
|
||||
fixCMakeFiles()
|
||||
{
|
||||
# change to build/install folder
|
||||
cd $ParaView_DIR || exit 1
|
||||
|
||||
# change to build/install folder
|
||||
cd $ParaView_DIR || exit 1
|
||||
|
||||
echo " Installing ParaView"
|
||||
|
||||
# Replace path with env variable: ParaView_DIR
|
||||
fixHardLinks ParaView_DIR "$ParaView_DIR" '*.cmake'
|
||||
|
||||
@ -291,9 +297,9 @@ fixCMakeFiles()
|
||||
|
||||
# Replace path with env variable: WM_COMPILER_DIR
|
||||
# (include cmake.check_cache)
|
||||
## SKIP THIS - it (it always triggers a complete rebuild)
|
||||
## when using cmake-2.6.2
|
||||
## fixHardLinks WM_COMPILER_DIR "$WM_COMPILER_DIR" '*cmake*'
|
||||
# This triggers a complete rebuild (with cmake-2.6.2), but is likely
|
||||
# needed when redistributing files
|
||||
fixHardLinks WM_COMPILER_DIR "$WM_COMPILER_DIR" '*cmake*'
|
||||
}
|
||||
|
||||
|
||||
@ -308,8 +314,6 @@ installParaView()
|
||||
cd $ParaView_DIR || exit 1
|
||||
|
||||
echo " Installing ParaView"
|
||||
## This triggers a partial rebuild, but might let us find our files
|
||||
## fixCMakeFiles
|
||||
|
||||
# skip the normal 'make install' in favour of simply creating
|
||||
# a softlink to the $ParaView_DIR/bin folder
|
||||
|
||||
Reference in New Issue
Block a user