Allow user to specify another version of CMake
On CentOS, cmake28 must be used rather than the standard cmake
This commit is contained in:
parent
9320faaf83
commit
cbd78d9cc2
12
configure
vendored
12
configure
vendored
@ -35,6 +35,7 @@ Optional Packages:
|
|||||||
--with-tinyxml=PATH use TinyXML library from a specified location
|
--with-tinyxml=PATH use TinyXML library from a specified location
|
||||||
(Note: if not found, then a bundled library will
|
(Note: if not found, then a bundled library will
|
||||||
be used)
|
be used)
|
||||||
|
--with-cmake=PROGRAM use this program instead of \`cmake' to configure
|
||||||
|
|
||||||
Some influential environment variables:
|
Some influential environment variables:
|
||||||
CC C compiler command
|
CC C compiler command
|
||||||
@ -88,6 +89,9 @@ option_check=yes
|
|||||||
# this variable will get feature options
|
# this variable will get feature options
|
||||||
FEATURES=
|
FEATURES=
|
||||||
|
|
||||||
|
# command that launches cmake
|
||||||
|
CMAKE=cmake
|
||||||
|
|
||||||
# long arguments are implemented by putting a dash character followed by
|
# long arguments are implemented by putting a dash character followed by
|
||||||
# a colon in the optspec, see trick by Arvid Requate at
|
# a colon in the optspec, see trick by Arvid Requate at
|
||||||
# <http://stackoverflow.com/questions/402377/#7680682>
|
# <http://stackoverflow.com/questions/402377/#7680682>
|
||||||
@ -110,6 +114,12 @@ while getopts -- ":-:" optchar; do
|
|||||||
pkgname=${pkgname#with-}
|
pkgname=${pkgname#with-}
|
||||||
# get the location of the package; everyhing after equal sign
|
# get the location of the package; everyhing after equal sign
|
||||||
pkgloc=${OPTARG#*=}
|
pkgloc=${OPTARG#*=}
|
||||||
|
# the parameter to this option is an executable program, so
|
||||||
|
# skip the directory test in that case
|
||||||
|
if [ "${pkgname}" = "cmake" ]; then
|
||||||
|
CMAKE="${pkgloc}"
|
||||||
|
break
|
||||||
|
fi
|
||||||
# expand to full path since CMake changes to source directory (!)
|
# expand to full path since CMake changes to source directory (!)
|
||||||
# this also normalize the path name wrt. not having a trailing slash
|
# this also normalize the path name wrt. not having a trailing slash
|
||||||
pkgloc=$(test -d "${pkgloc}" && sh -c "cd \"${pkgloc}\"; pwd")
|
pkgloc=$(test -d "${pkgloc}" && sh -c "cd \"${pkgloc}\"; pwd")
|
||||||
@ -254,7 +264,7 @@ shift $((OPTIND-1))
|
|||||||
ENVVARS=${@/ACLOCAL_*=*/}
|
ENVVARS=${@/ACLOCAL_*=*/}
|
||||||
|
|
||||||
# pass everything on to CMake
|
# pass everything on to CMake
|
||||||
CMDLINE="env ${ENVVARS} cmake \"$(dirname "$0")\" \"-DCMAKE_INSTALL_PREFIX=$prefix\" -DCMAKE_BUILD_TYPE=${buildtype}${pch_use}${silent_rules}${debug_loc} ${FEATURES}"
|
CMDLINE="env ${ENVVARS} ${CMAKE} \"$(dirname "$0")\" \"-DCMAKE_INSTALL_PREFIX=$prefix\" -DCMAKE_BUILD_TYPE=${buildtype}${pch_use}${silent_rules}${debug_loc} ${FEATURES}"
|
||||||
echo --- calling CMake for opm-core ---
|
echo --- calling CMake for opm-core ---
|
||||||
echo ${CMDLINE}
|
echo ${CMDLINE}
|
||||||
eval exec ${CMDLINE}
|
eval exec ${CMDLINE}
|
||||||
|
Loading…
Reference in New Issue
Block a user