2 Star 0 Fork 1

sinojelly/testngpp2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build_test.sh 1.63 KB
一键复制 编辑 原始数据 按行查看 历史
sinojelly 提交于 2021-04-24 13:07 . add +x to build .sh scripts
#!/bin/bash
# build mockcpp and it's tests, and at last run all tests.
# $1 --- [optional] compiler name (default is GNU)
# $2 --- [optional] compiler major version (The first part of cxx compiler version)
# if you want to choose a compiler other than GNU, you can
# uncomment the ReadUserChoice, config the CompilerArray in tools/build_functions.sh, then
# InitEnviroment $USER_CHOOSED_COMPILER $USER_CHOOSED_COMPILER_MAJOR_VER
# fast fail
set -e
. "tools/build_functions.sh"
MY_OS_NAME=""
MY_CXX_COMPILER_NAME=""
MY_CXX_COMPILER_MAJOR_VERSION=""
CMAKE_COMPILER_PARAM=""
MAKE_BUILD_TYPE=""
USER_CHOOSED_COMPILER=""
USER_CHOOSED_COMPILER_MAJOR_VER=""
# script usage 1: no parameter, use GNU compiler
AUTO_COMPILER="GNU"
AUTO_CXX_VER=`gcc -dumpversion | awk -F. '{print $1}'`
InitEnviroment $AUTO_COMPILER $AUTO_CXX_VER
# script usage 2: input the compiler name and major version
#InitEnviroment $1 $2
# script usage 3: choose the compiler and version
#ReadUserChoice
#InitEnviroment $USER_CHOOSED_COMPILER $USER_CHOOSED_COMPILER_MAJOR_VER
BUILD_DIR="build_$MY_CXX_COMPILER_NAME"
OS_COMPILER="$MY_OS_NAME/$MY_CXX_COMPILER_NAME/$MY_CXX_COMPILER_MAJOR_VERSION"
echo "OS_COMPILER in Shell : $OS_COMPILER"
#if [ $3 != "test" ]; then
cmake -S . -B $BUILD_DIR/testngpp
cmake -S tests/3rdparty/testngppst -B $BUILD_DIR/testngpp_testngppst
cmake -S tests -B $BUILD_DIR/testngpp_tests
CompileProject $MY_CXX_COMPILER_NAME $BUILD_DIR/testngpp
CompileProject $MY_CXX_COMPILER_NAME $BUILD_DIR/testngpp_testngppst
CompileProject $MY_CXX_COMPILER_NAME $BUILD_DIR/testngpp_tests
#fi
RunTests $BUILD_DIR testngpp_tests $MAKE_BUILD_TYPE testngpp_testngppst st
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sinojelly/testngpp2.git
git@gitee.com:sinojelly/testngpp2.git
sinojelly
testngpp2
testngpp2
master

搜索帮助