summaryrefslogtreecommitdiffstats
path: root/scripts/smtk2ssrf-build.sh
diff options
context:
space:
mode:
authorGravatar Salvador Cuñat <salvador.cunat@gmail.com>2017-10-29 10:06:53 +0100
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2017-10-29 17:08:36 +0100
commit15028fd299e639a5b006c620dfe0e241b22c4163 (patch)
tree849f1c2eb34ab1fd020474891abe4c2280cc250c /scripts/smtk2ssrf-build.sh
parentd7d8434f4eea4157276f2717117e3cb00f64f5b8 (diff)
downloadsubsurface-15028fd299e639a5b006c620dfe0e241b22c4163.tar.gz
smtk2ssrf-build.sh: add building command line mode
Add a flag to build with -DCOMMANDLINE=ON
Diffstat (limited to 'scripts/smtk2ssrf-build.sh')
-rwxr-xr-xscripts/smtk2ssrf-build.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/smtk2ssrf-build.sh b/scripts/smtk2ssrf-build.sh
index f25b5a6ad..59d8037a9 100755
--- a/scripts/smtk2ssrf-build.sh
+++ b/scripts/smtk2ssrf-build.sh
@@ -2,7 +2,8 @@
# This script is meant to run from src directory in the same fashion than
# subsurface/scripts/build.sh
#
-# Flags: -t (--tag) A git valid tag, commit, etc in subsurface tree
+# Flags: -c (--cli) Build commandline version (no graphics)
+# -t (--tag) A git valid tag, commit, etc in subsurface tree
# -j (--jobs) Desired build parallelism, integer.
# -b (--build) Cmake build type, valid values Debug or Release
# Examples:
@@ -53,6 +54,8 @@ read -rs _proceed
#
while [ $# -gt 0 ]; do
case $1 in
+ -c|--cli) CLI="ON"
+ ;;
-t|--tag) SSRF_TAG="$2"
shift;;
-j|--jobs) JOBS=-j"$2"
@@ -164,7 +167,9 @@ cd "$SSRF_PATH"/smtk-import || aborting "Couldnt cd into $SSRF_PATH/smtk-import"
mkdir -p build
cd build || aborting "Couldn't cd into $SSRF_PATH/smtk-import/build"
-cmake -DCMAKE_BUILD_TYPE="$RELEASE" .. || aborting "Cmake incomplete"
+cmake -DCMAKE_BUILD_TYPE="$RELEASE" \
+ -DCOMMANDLINE=${CLI:-OFF} \
+ .. || aborting "Cmake incomplete"
make "$JOBS" || aborting "Failed to build smtk2ssrf"