blockpp

A blockchain implementation in c++.


blockpp

/

build.sh

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
#!/usr/bin/env bash
set -e

# source environment variables
source ./env.sh

BUILD_TYPE="Debug"

if [[ $# > 0 ]]; then
  if [[ $1 == "-d" ]]; then
    BUILD_TYPE="Debug"
  elif [[ $1 == "-r" ]]; then
    BUILD_TYPE="Release"
  fi
fi

if [[ ${BUILD_TYPE} == "Debug" ]]; then
  printf "\nBuilding ${APP}\n"

  printf "\nCompiling ${APP}\n"
  mkdir -p build/debug
  cd build/debug
  cmake ../../ -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
  time make
  cd ../../

elif [[ ${BUILD_TYPE} == "Release" ]]; then
  printf "\nBuilding ${APP}\n"

  printf "\nCompiling ${APP}\n"
  mkdir -p build/release
  cd build/release
  cmake ../../ -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
  time make
  cd ../../
fi
Back to Top