9 Star 14 Fork 0

Tecorigin / Teco-AL

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build.sh 2.01 KB
一键复制 编辑 原始数据 按行查看 历史
Admin 提交于 2024-04-12 13:43 . [feat](op): add conv
#! /bin/bash
set -e
#set -x
# default build not build unittest
BUILD_TEST=OFF
# default build release type
CMAKE_BUILD_TYPE=Release
# default do not build with VERBOSE=1
BUILD_VERBOSE=OFF
usage () {
echo "USAGE: ./build.sh <options>"
echo
echo "OPTIONS:"
echo " -h, --help Print usage."
echo " --test {on/off} Build unittest(default not build unittest)."
echo " --debug Build debug type(default build release type)."
echo " --build_verbose Build with VERBOSE=1 and 1 thread(default with 32 threads)."
echo
}
while [ $# != 0 ]; do
case "$1" in
-h | --help)
usage
exit 0
;;
--test)
shift
case "$1" in
on)
BUILD_TEST=ON
shift
;;
off)
BUILD_TEST=OFF
shift
;;
*)
echo "-- Unknown options for --test ${1}, only support on or off, use -h or --help"
usage
exit -1
;;
esac
;;
--debug)
CMAKE_BUILD_TYPE=DEBUG
shift
;;
--build_verbose)
BUILD_VERBOSE=ON
shift
;;
*)
echo "-- Unknown options ${1}, use -h or --help"
usage
exit -1
;;
esac
done
if [[ ${TECO_READY_TO_BUILD} != "ON" ]]; then
echo "please source env.sh before build.sh."
exit -1
fi
# create build directory
if [[ -d build ]]; then
rm build/* -rf
elif [[ -a build ]]; then
rm build
mkdir build
else
mkdir build
fi
# build tecoal
pushd build
cmake \
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-DBUILD_TEST=${BUILD_TEST} \
..
if [ "${BUILD_VERBOSE}" == "ON" ]; then
make -j1 VERBOSE=1
else
make -j32
fi
popd
1
https://gitee.com/tecorigin/teco-al.git
git@gitee.com:tecorigin/teco-al.git
tecorigin
teco-al
Teco-AL
develop

搜索帮助