mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-28 03:53:49 -06:00
Allow source location to be overridden
By default the configure script assumes that the source is located relative to the script itself. By allowing this to be overridden, the script can be shared by other projects, each passing their own location as an extra parameter.
This commit is contained in:
parent
e4a345a648
commit
dcc972f128
7
cmake/Scripts/configure
vendored
7
cmake/Scripts/configure
vendored
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# where is the source tree located
|
||||
# where is the source tree located by default relative to here
|
||||
srcdir=$(dirname $(dirname $(dirname "$0")))
|
||||
|
||||
# display help text
|
||||
@ -141,6 +141,11 @@ for OPT in "$@"; do
|
||||
OPTARG=${OPT#--}
|
||||
# OPTARG now contains everything after double dashes
|
||||
case "${OPTARG}" in
|
||||
src-dir=*)
|
||||
# allow the user to use these build macros for another
|
||||
# project (so source-dir is not relative to us)
|
||||
srcdir=${OPTARG#*=}
|
||||
;;
|
||||
prefix=*)
|
||||
# remove prefix consisting of everything up to equal sign
|
||||
prefix=${OPTARG#*=}
|
||||
|
Loading…
Reference in New Issue
Block a user