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