aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2019-12-25 20:28:07 +0100
committerMarvin W <git@larma.de>2019-12-25 20:28:07 +0100
commit7d1497a549892f97ef28bd9e1f5cc65df2f30635 (patch)
tree32e2a6c505ce2da2deb96fe702f459f16e4eb9f8
parentf3af064262e3ea8afe8397424b5f05d260a2a57e (diff)
downloaddino-7d1497a549892f97ef28bd9e1f5cc65df2f30635.tar.gz
dino-7d1497a549892f97ef28bd9e1f5cc65df2f30635.zip
Add --release to ./configure, test via travis
-rw-r--r--.travis.yml5
-rwxr-xr-xconfigure12
2 files changed, 12 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml
index f34e9760..99d4c982 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,11 +1,14 @@
dist: bionic
language: c
+env:
+ - CONFIGURE_FLAGS=
+ - CONFIGURE_FLAGS=--release
before_install:
- export USE_CCACHE=1
- sudo apt-get update
- sudo apt-get install -y cmake valac libgee-0.8-dev libsqlite3-dev libgtk-3-dev libnotify-dev libgpgme-dev libsoup2.4-dev libgcrypt20-dev libqrencode-dev
install:
- - ./configure --with-tests
+ - ./configure --with-tests $CONFIGURE_FLAGS
- make
script:
- build/xmpp-vala-test
diff --git a/configure b/configure
index c60488ab..061a5c7d 100755
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
#!/bin/sh
OPTS=`getopt -o "h" --long \
-help,fetch-only,no-debug,disable-fast-vapi,with-tests,\
+help,fetch-only,no-debug,disable-fast-vapi,with-tests,release,\
enable-plugin:,disable-plugin:,\
prefix:,program-prefix:,exec-prefix:,lib-suffix:,\
bindir:,libdir:,includedir:,datadir:,\
@@ -18,6 +18,7 @@ PREFIX=${PREFIX:-/usr/local}
ENABLED_PLUGINS=
DISABLED_PLUGINS=
BUILD_TESTS=
+BUILD_TYPE=Debug
DISABLE_FAST_VAPI=
LIB_SUFFIX=
NO_DEBUG=
@@ -46,13 +47,14 @@ brackets.
Configuration:
-h, --help Print this help and exit
- --fetch-only Only fetch the files required to run ./configure
- without network access later and exit
- --no-debug Build without debug symbols
--disable-fast-vapi Disable the usage of Vala compilers fast-vapi
feature. fast-vapi mode is slower when doing
clean builds, but faster when doing incremental
builds (during development).
+ --fetch-only Only fetch the files required to run ./configure
+ without network access later and exit
+ --no-debug Build without debug symbols
+ --release Configure to build an optimized release version
--with-tests Also build tests.
Plugin configuration:
@@ -111,6 +113,7 @@ while true; do
--disable-fast-vapi ) DISABLE_FAST_VAPI=yes; shift ;;
--no-debug ) NO_DEBUG=yes; shift ;;
--fetch-only ) FETCH_ONLY=yes; shift ;;
+ --release ) BUILD_TYPE=RelWithDebInfo; shift ;;
--with-tests ) BUILD_TESTS=yes; shift ;;
# Autotools paths
--program-prefix ) PREFIX="$2"; shift; shift ;;
@@ -249,6 +252,7 @@ echo "$cmake_type" > .cmake_type
echo "$ninja_version" > .ninja_version
cmake -G "$cmake_type" \
-DCMAKE_INSTALL_PREFIX="$PREFIX" \
+ -DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
-DENABLED_PLUGINS="$ENABLED_PLUGINS" \
-DDISABLED_PLUGINS="$DISABLED_PLUGINS" \
-DBUILD_TESTS="$BUILD_TESTS" \