From 5a1ec105567f064d0220d2195dd1765f609bb499 Mon Sep 17 00:00:00 2001 From: Fu Juntang <StrongTiger_001@163.com> Date: 星期五, 03 九月 2021 17:46:19 +0800 Subject: [PATCH] Merge branch 'master' of http://os.smartai.com:9091/valib/c_bhomebus --- build.sh | 48 ++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 40 insertions(+), 8 deletions(-) diff --git a/build.sh b/build.sh index fcb3286..ea2dcde 100755 --- a/build.sh +++ b/build.sh @@ -1,28 +1,60 @@ #! /bin/bash -[ -d build ] || mkdir build -# rm -rf build/* -cd build - BUILD_TYPE="Debug" +BUILD_DOC="OFF" +BUILD_SHARED_LIBS="ON" + +function usage() { + echo "build.sh [release | debug | doc]" +} case ${1} in "release") BUILD_TYPE="Release" + BUILD_SHARED_LIBS="ON" + ;; + + "debug") + BUILD_TYPE="Debug" + BUILD_SHARED_LIBS="ON" + ;; + + "doc") + BUILD_TYPE="Release" + BUILD_DOC="ON" + ;; + + "help") + usage + ;; + + "") + BUILD_TYPE="Debug" ;; *) - BUILD_TYPE="Debug" + echo "Invalid Argument." + usage ;; + esac -# -DCMAKE_BUILD_TYPE=Debug | Release + +[ -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=${BUILD_TYPE} -DSUPPORT_RDMA=OFF .. +cmake -DCMAKE_INSTALL_PREFIX="$(pwd)/../dest" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} \ + -DBUILD_DOC=${BUILD_DOC} -DSUPPORT_RDMA=OFF .. cmake --build . -#cmake --build . --target install +# cmake --build . --target install -- Gitblit v1.8.0