From a59d0c7b448597865c679c9d19ee13de742cea02 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Fri, 12 Feb 2016 13:27:40 +0100 Subject: include: Add logging infrastructure Adds the logging infrastructure to the prototype. 2 helper scripts are also provided to compile the prototype in either release or debug mode. In debug mode debugging logs are printed. --- compile_debug.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 compile_debug.sh (limited to 'compile_debug.sh') diff --git a/compile_debug.sh b/compile_debug.sh new file mode 100755 index 00000000..0b21b336 --- /dev/null +++ b/compile_debug.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +ME=compile_debug + +if (($# == 1 )) +then + PREFIX=`echo "$1"|sed -e "s,\/$,,"` +else + PREFIX="/usr/local/ouroboros" +fi + +BUILDDIR=build +DEBUGDIR=debug + +echo "$ME: Prefix is $PREFIX" + +echo "$ME: Build directory will be '$BUILDDIR'" +if test -n "$BUILDDIR" ; then + mkdir -p $BUILDDIR || { + echo "$ME: Cannot create directory '$BUILDDIR'" + } +fi +cd $BUILDDIR + +echo "$ME: Debug directory will be '$DEBUGDIR'" +if test -n "$DEBUGDIR" ; then + mkdir -p $DEBUGDIR || { + echo "$ME: Cannot create directory '$DEBUGDIR'" + } +fi +cd $DEBUGDIR + +cmake -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_BUILD_TYPE=Debug ../.. + +make -- cgit v1.2.3