Commit 9926569c authored by mark's avatar mark
Browse files

ENH: add -suffix option for makeParaView and makeVTK

- simple means of distinguishing between types of builds
  (mesa, mpi, python).
parent fc3ea2f1
......@@ -37,11 +37,9 @@ unset withQT QT_VERSION QMAKE_PATH
unset withMESA MESA_INCLUDE MESA_LIBRARY withOSMESA
unset withPYTHON PYTHON_INCLUDE PYTHON_LIBRARY
unset withGL2
unset OBJ_ADD
BUILD_TYPE=Release # The cmake build type
# sourceBASE, buildBASE, installBASE
# sourceBASE, buildBASE, installBASE and BUILD_SUFFIX
# are defined in tools/ThirdPartyFunctions
#------------------------------------------------------------------------------
......@@ -75,11 +73,8 @@ setParaViewDirs()
exit 1
}
# ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION${OBJ_ADD:+-$OBJ_ADD}
ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION
# ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION${OBJ_ADD:+-$OBJ_ADD}
ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION
ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION$BUILD_SUFFIX
ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION$BUILD_SUFFIX
export ParaView_SOURCE_DIR ParaView_BINARY_DIR ParaView_DIR
......@@ -173,8 +168,6 @@ addMpiSupport()
return
fi
OBJ_ADD="$OBJ_ADD-mpi"
addCMakeVariable "PARAVIEW_USE_MPI=ON VTK_USE_MPI=ON"
if [ "${MPI_MAX_PROCS:=0}" -gt 1 ]
then
......@@ -193,8 +186,6 @@ addPythonSupport()
return
fi
OBJ_ADD="$OBJ_ADD-py"
if pythonBin=$(which python 2>/dev/null)
then
if [ -n "$PYTHON_LIBRARY" ]
......@@ -407,6 +398,7 @@ configParaView()
echo " Build : $ParaView_BINARY_DIR"
echo " Target : $ParaView_DIR"
echo " cmake : $cmake"
echo " Build suffix : ${BUILD_SUFFIX:-none}"
echo "----"
echo
echo "$cmake" \
......
......@@ -36,6 +36,25 @@ sourceBASE=$WM_THIRD_PARTY_DIR
buildBASE=$WM_THIRD_PARTY_DIR/build/$WM_ARCH$WM_COMPILER
installBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER
unset BUILD_SUFFIX
#------------------------------------------------------------------------------
#
# Set a suffix for the build
# - eg, for -mpi, or -mesa etc
#
setBuildSuffix()
{
BUILD_SUFFIX="${1##-}"
if [ -n "$BUILD_SUFFIX" ]
then
BUILD_SUFFIX="-${BUILD_SUFFIX}"
else
unset BUILD_SUFFIX
fi
}
#
# Mostly building without wmake
# - disable wmakeScheduler variables
......
......@@ -33,8 +33,8 @@
# Variables referenced by the functions. Initialization at the end of the file.
unset CMAKE_VARIABLES
# sourceBASE, buildBASE, installBASE defined in tools/ThirdPartyFunctions
# sourceBASE, buildBASE, installBASE and BUILD_SUFFIX
# are defined in tools/ThirdPartyFunctions
#------------------------------------------------------------------------------
#
......@@ -67,11 +67,8 @@ setVtkDirs()
exit 1
}
# VTK_BINARY_DIR=$buildBASE/VTK-$VTK_VERSION${OBJ_ADD:+-$OBJ_ADD}
VTK_BINARY_DIR=$buildBASE/VTK-$VTK_VERSION
# VTK_DIR=$installBASE/VTK-$VTK_VERSION${OBJ_ADD:+-$OBJ_ADD}
VTK_DIR=$installBASE/VTK-$VTK_VERSION
VTK_BINARY_DIR=$buildBASE/VTK-$VTK_VERSION$BUILD_SUFFIX
VTK_DIR=$installBASE/VTK-$VTK_VERSION$BUILD_SUFFIX
export VTK_SOURCE_DIR VTK_BINARY_DIR VTK_DIR
......@@ -145,6 +142,7 @@ configVTK()
echo " Build : $VTK_BINARY_DIR"
echo " Target : $VTK_DIR"
echo " cmake : $cmake"
echo " Build suffix : ${BUILD_SUFFIX:-none}"
echo "----"
echo
echo "$cmake" \
......
......@@ -353,7 +353,7 @@ else
cd $buildDIR && $cmake \
-DCMAKE_INSTALL_PREFIX=$ADIOS_ARCH_PATH \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_FORTRAN:BOOL=FALSE \
-DBUILD_FORTRAN=FALSE \
$ADIOS_SOURCE_DIR \
&& make -j $WM_NCOMPPROCS all \
&& make install \
......
......@@ -403,7 +403,7 @@ CMAKE_OPTIONS
elif _foamIsNone $GMP_ARCH_PATH
then
echo " disabled : gmp"
configGmp="-DCGAL_DISABLE_GMP:BOOL=TRUE" # Also used for mpfr
configGmp="-DCGAL_DISABLE_GMP=TRUE" # Also used for mpfr
elif [ -d "$GMP_ARCH_PATH" ]
then
echo " ThirdParty : gmp"
......@@ -425,7 +425,7 @@ CMAKE_OPTIONS
elif _foamIsNone $MPFR_ARCH_PATH
then
echo " disabled : mpfr"
configGmp="-DCGAL_DISABLE_GMP:BOOL=TRUE" # Also used for mpfr
configGmp="-DCGAL_DISABLE_GMP=TRUE" # Also used for mpfr
elif [ -d "$MPFR_ARCH_PATH" ]
then
echo " ThirdParty : mpfr"
......
......@@ -189,7 +189,7 @@ else
$cmake \
-DCMAKE_INSTALL_PREFIX=$LLVM_ARCH_PATH \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DBUILD_SHARED_LIBS=ON \
$LLVM_SOURCE_DIR \
&& make -j $WM_NCOMPPROCS \
&& make install \
......
......@@ -108,6 +108,7 @@ options:
-version VER specify an alternative version (current value: $ParaView_VERSION)
-major VER specify an alternative major version for special builds
-buildType NAME specify the build type (default: Release)
-suffix NAME specify a suffix to distinguish the build
-help
The -no-FEATURE option can be used to forcibly disable these features:
......@@ -127,7 +128,7 @@ For finer control, the build stages can be selected or deselected individually:
* Make and install paraview-$ParaView_VERSION located under
\$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION
-> \$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-$ParaView_VERSION
-> \$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-$ParaView_VERSION$BUILD_SUFFIX
To make a different paraview version, simply specify on the command-line.
For example,
......@@ -300,6 +301,11 @@ do
BUILD_TYPE="$2"
shift
;;
-suffix)
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
setBuildSuffix "$2"
shift
;;
*)
die "unknown option/argument: '$1'"
;;
......
......@@ -9,6 +9,7 @@ mesa=mesa-13.0.3
./makeParaView \
-mpi=0 \
-mesa-prefix $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mesa \
-suffix mesa \
"$@"
#------------------------------------------------------------------------------
......@@ -88,6 +88,7 @@ options:
-verbose verbose output in Makefiles
-version VER specify an alternative version (current value: $VTK_VERSION)
-buildType NAME specify the build type (default: Release)
-suffix NAME specify a suffix to distinguish the build
-help
The -no-FEATURE option can be disable these features (if not already disabled):
......@@ -107,7 +108,7 @@ For finer control, the build stages can be selected or deselected individually:
* Make and install VTK-$VTK_VERSION located under
\$WM_THIRD_PARTY_DIR/VTK-$VTK_VERSION
-> \$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/VTK-$VTK_VERSION
-> \$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/VTK-$VTK_VERSION$BUILD_SUFFIX
USAGE
exit 1
......@@ -238,6 +239,11 @@ do
BUILD_TYPE="$2"
shift
;;
-suffix)
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
setBuildSuffix "$2"
shift
;;
*)
die "unknown option/argument: '$1'"
;;
......
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