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