Skip to content
Snippets Groups Projects
Commit f88e11ce authored by Mark Olesen's avatar Mark Olesen
Browse files

ENH: don't set ParaView_MAJOR if the ParaView_VERSION appears

non-numeric (eg, a git or cvs version).

- place the onus on the user to provide the correct ParaView_MAJOR in
  these situations.

STYLE: Drop support for cmake older than 2.6.4 (installed in 3rdParty)
parent c9376b28
No related branches found
No related tags found
No related merge requests found
...@@ -39,7 +39,7 @@ cleaned=`$WM_PROJECT_DIR/bin/foamCleanPath "$PATH" "$WM_THIRD_PARTY_DIR/platform ...@@ -39,7 +39,7 @@ cleaned=`$WM_PROJECT_DIR/bin/foamCleanPath "$PATH" "$WM_THIRD_PARTY_DIR/platform
# determine the cmake to be used # determine the cmake to be used
unset CMAKE_HOME unset CMAKE_HOME
for cmake in cmake-2.8.1 cmake-2.8.0 cmake-2.6.4 cmake-2.6.2 cmake-2.4.6 for cmake in cmake-2.8.1 cmake-2.8.0 cmake-2.6.4
do do
cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake
if [ -r $cmake ] if [ -r $cmake ]
...@@ -52,20 +52,22 @@ done ...@@ -52,20 +52,22 @@ done
# set VERSION and MAJOR (version) variables if not already set # set VERSION and MAJOR (version) variables if not already set
[ -z "$ParaView_VERSION" ] && export ParaView_VERSION=3.6.1 [ -n "$ParaView_VERSION" ] || ParaView_VERSION=3.6.1
[ -n "$ParaView_MAJOR" ] || ParaView_MAJOR=unknown
# if needed, set MAJOR version to correspond to VERSION # if needed, set MAJOR version to correspond to VERSION
# ParaView_MAJOR is "<digits>.<digits>" from ParaView_VERSION # ParaView_MAJOR is "<digits>.<digits>" from ParaView_VERSION
case "$ParaView_VERSION" in case "$ParaView_VERSION" in
"${ParaView_MAJOR}.*" ) "$ParaView_MAJOR".* )
# version and major appear to correspond # version and major appear to correspond
;; ;;
*) [0-9]*)
[ -z ${ParaView_MAJOR} ] && ParaView_MAJOR=`echo $ParaView_VERSION | sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'` # extract major from the version
ParaView_MAJOR=`echo $ParaView_VERSION | sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`
;; ;;
esac esac
export ParaView_MAJOR export ParaView_VERSION ParaView_MAJOR
paraviewInstDir=$WM_THIRD_PARTY_DIR/paraview-$ParaView_VERSION paraviewInstDir=$WM_THIRD_PARTY_DIR/paraview-$ParaView_VERSION
export ParaView_DIR=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-$ParaView_VERSION export ParaView_DIR=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-$ParaView_VERSION
......
...@@ -40,7 +40,7 @@ if ( $status == 0 ) set path=($cleaned) ...@@ -40,7 +40,7 @@ if ( $status == 0 ) set path=($cleaned)
# determine the cmake to be used # determine the cmake to be used
unsetenv CMAKE_HOME unsetenv CMAKE_HOME
foreach cmake ( cmake-2.8.1 cmake-2.8.0 cmake-2.6.4 cmake-2.6.2 cmake-2.4.6 ) foreach cmake ( cmake-2.8.1 cmake-2.8.0 cmake-2.6.4 )
set cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake set cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake
if ( -r $cmake ) then if ( -r $cmake ) then
setenv CMAKE_HOME $cmake setenv CMAKE_HOME $cmake
...@@ -51,16 +51,17 @@ end ...@@ -51,16 +51,17 @@ end
# set VERSION and MAJOR (version) variables if not already set # set VERSION and MAJOR (version) variables if not already set
if ( ! $?ParaView_VERSION || "x$ParaView_VERSION" == "x" ) setenv ParaView_VERSION 3.6.1 if ( ! $?ParaView_VERSION || "x$ParaView_VERSION" == "x" ) setenv ParaView_VERSION 3.6.1
if ( ! $?ParaView_MAJOR ) setenv ParaView_MAJOR unknown if ( ! $?ParaView_MAJOR ) setenv ParaView_MAJOR unknown
# if needed, set MAJOR version to correspond to VERSION # if needed, set MAJOR version to correspond to VERSION
# ParaView_MAJOR is "<digits>.<digits>" from ParaView_VERSION # ParaView_MAJOR is "<digits>.<digits>" from ParaView_VERSION
switch ("$ParaView_VERSION") switch ("$ParaView_VERSION")
case "${ParaView_MAJOR}.*": case "$ParaView_MAJOR".*:
# version and major appear to correspond # version and major appear to correspond
breaksw breaksw
default: case [0-9]*:
# extract major from the version
setenv ParaView_MAJOR `echo ${ParaView_VERSION} | \ setenv ParaView_MAJOR `echo ${ParaView_VERSION} | \
sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'` sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`
breaksw breaksw
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment