From 543e82effca8836d0730ed69fcf46fbc09b6e512 Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期四, 14 一月 2021 15:17:25 +0800
Subject: [PATCH] Merge branch 'dev'

---
 build.sh |   31 ++++++++++++++++++++++++++++++-
 1 files changed, 30 insertions(+), 1 deletions(-)

diff --git a/build.sh b/build.sh
index c5cec4e..772ddf4 100755
--- a/build.sh
+++ b/build.sh
@@ -1,14 +1,43 @@
 #! /bin/bash
 
+BUILD_TYPE="Debug"
+
+function usage() {
+	echo "build.sh [release | debug]"
+}
+
+case ${1} in
+  "release")
+  BUILD_TYPE="Release"
+  ;;
+  
+  "debug")
+  BUILD_TYPE="Debug"
+  ;;
+
+  "")
+  BUILD_TYPE="Debug"
+  ;;
+  
+  *)
+  echo "Invalid Argument."
+ 	usage
+  ;;
+esac
+
+
 [ -d build ] || mkdir build
 # rm -rf build/*
 cd build
  
+
+
+
 # -DCMAKE_BUILD_TYPE=Debug  | Release
 # -DBUILD_SHARED_LIBS=ON
 # -DCMAKE_INSTALL_PREFIX=$(pwd/../dest)
 # -DQCA_MAN_INSTALL_DIR:PATH=/usr/share/man 
-cmake -DCMAKE_INSTALL_PREFIX="$(pwd)/../dest" -DCMAKE_BUILD_TYPE=Debug -DSUPPORT_RDMA=OFF ..
+cmake -DCMAKE_INSTALL_PREFIX="$(pwd)/../dest" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DSUPPORT_RDMA=OFF ..
 
 cmake --build .
 

--
Gitblit v1.8.0