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
|
||||
(Note: if not found, then a bundled library will
|
||||
be used)
|
||||
--with-cmake=PROGRAM use this program instead of \`cmake' to configure
|
||||
|
||||
Some influential environment variables:
|
||||
CC C compiler command
|
||||
@ -88,6 +89,9 @@ option_check=yes
|
||||
# this variable will get feature options
|
||||
FEATURES=
|
||||
|
||||
# command that launches cmake
|
||||
CMAKE=cmake
|
||||
|
||||
# long arguments are implemented by putting a dash character followed by
|
||||
# a colon in the optspec, see trick by Arvid Requate at
|
||||
# <http://stackoverflow.com/questions/402377/#7680682>
|
||||
@ -110,6 +114,12 @@ while getopts -- ":-:" optchar; do
|
||||
pkgname=${pkgname#with-}
|
||||
# get the location of the package; everyhing after equal sign
|
||||
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 (!)
|
||||
# this also normalize the path name wrt. not having a trailing slash
|
||||
pkgloc=$(test -d "${pkgloc}" && sh -c "cd \"${pkgloc}\"; pwd")
|
||||
@ -254,7 +264,7 @@ shift $((OPTIND-1))
|
||||
ENVVARS=${@/ACLOCAL_*=*/}
|
||||
|
||||
# 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 ${CMDLINE}
|
||||
eval exec ${CMDLINE}
|
||||
|
Loading…
Reference in New Issue
Block a user