diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2018-07-09 09:53:43 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-07-09 15:23:49 -0700 |
commit | e15b41827cc341f5854d4c87f0acc7f37292ebc3 (patch) | |
tree | 6dc22cd6a0750fb919cf831a5d31c6ce3cf523f5 /scripts/build.sh | |
parent | 3ec508cdcd280f61e7d19cac29b4536295db4d0c (diff) | |
download | subsurface-e15b41827cc341f5854d4c87f0acc7f37292ebc3.tar.gz |
build-system: allow selection of Debug or Release build
So far we did a rather odd mix by default.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'scripts/build.sh')
-rwxr-xr-x | scripts/build.sh | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/build.sh b/scripts/build.sh index 101330956..fc111769a 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -18,6 +18,7 @@ SRC=$(pwd) PLATFORM=$(uname) BTSUPPORT="ON" +DEBUGRELEASE="Debug" # deal with all the command line arguments while [[ $# -gt 0 ]] ; do @@ -62,6 +63,10 @@ while [[ $# -gt 0 ]] ; do # hack for Travix Mac build SKIP_GOOGLEMAPS="1" ;; + -release) + # don't build Debug binaries + DEBUGRELEASE="Release" + ;; *) echo "Unknown command line argument $arg" ;; @@ -220,7 +225,7 @@ if [[ $PLATFORM = Darwin && "$BUILD_DEPS" == "1" ]] ; then pushd libssh2 mkdir -p build cd build - cmake $OLDER_MAC_CMAKE -DCMAKE_INSTALL_PREFIX=$INSTALL_ROOT -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF .. + cmake $OLDER_MAC_CMAKE -DCMAKE_INSTALL_PREFIX=$INSTALL_ROOT -DCMAKE_BUILD_TYPE=$DEBUGRELEASE -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF .. make -j4 make install popd @@ -243,7 +248,7 @@ if [[ "$LIBGIT" < "24" ]] ; then pushd libgit2 mkdir -p build cd build - cmake $OLDER_MAC_CMAKE -DCMAKE_INSTALL_PREFIX=$INSTALL_ROOT -DCMAKE_BUILD_TYPE=Release -DBUILD_CLAR=OFF .. + cmake $OLDER_MAC_CMAKE -DCMAKE_INSTALL_PREFIX=$INSTALL_ROOT -DCMAKE_BUILD_TYPE=$DEBUGRELEASE -DBUILD_CLAR=OFF .. make -j4 make install popd @@ -404,7 +409,7 @@ if [ "$BUILDGRANTLEE" = "1" ] ; then fi mkdir -p build cd build - cmake $OLDER_MAC_CMAKE -DCMAKE_BUILD_TYPE=Release \ + cmake $OLDER_MAC_CMAKE -DCMAKE_BUILD_TYPE=$DEBUGRELEASE \ -DCMAKE_INSTALL_PREFIX=$INSTALL_ROOT \ -DBUILD_TESTS=NO \ $SRC/grantlee @@ -462,7 +467,7 @@ for (( i=0 ; i < ${#BUILDS[@]} ; i++ )) ; do mkdir -p $SRC/subsurface/$BUILDDIR cd $SRC/subsurface/$BUILDDIR export CMAKE_PREFIX_PATH="$INSTALL_ROOT/lib/cmake;${CMAKE_PREFIX_PATH}" - cmake -DCMAKE_BUILD_TYPE=Debug .. \ + cmake -DCMAKE_BUILD_TYPE=$DEBUGRELEASE .. \ -DSUBSURFACE_TARGET_EXECUTABLE=$SUBSURFACE_EXECUTABLE \ ${LIBGIT_ARGS} \ -DLIBDIVECOMPUTER_INCLUDE_DIR=$INSTALL_ROOT/include \ |