From 045dfc05c54637774aae2a35b030b27d3be1c3b9 Mon Sep 17 00:00:00 2001 From: yuu Date: Tue, 2 Jul 2024 10:59:15 +0800 Subject: [PATCH] use cmake to build --- build.sh | 7 ++++++- build/script/build_opengauss.sh | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 4de8acaea..5cd6b384e 100755 --- a/build.sh +++ b/build.sh @@ -32,6 +32,7 @@ function print_help() -pm|--product_mode this values of paramenter is opengauss or lite or finance, the default value is opengauss. -nls|--enable_nls enable Native Language Support --relocation generate gaussdb.map with relocation(GCC >=10.3). + --cmake use cmake to build openGauss, which is faster than traditional configure/autoconf " } @@ -90,6 +91,10 @@ while [ $# -gt 0 ]; do extra_config_opt="$extra_config_opt --config_opt --enable-relocation " shift 1 ;; + -C|--cmake) + build_by_cmake='--cmake' + shift 1 + ;; *) echo "Internal Error: option processing error: $1" 1>&2 echo "please input right paramtenter, the following command may help you" @@ -103,7 +108,7 @@ ROOT_DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd) echo "ROOT_DIR : $ROOT_DIR" cd build/script chmod a+x build_opengauss.sh -./build_opengauss.sh -m ${build_version_mode} -3rd ${build_binarylib_dir} ${not_optimized} -pkg server ${build_with_tassl} -pm ${product_mode} ${extra_config_opt} +./build_opengauss.sh -m ${build_version_mode} -3rd ${build_binarylib_dir} ${not_optimized} -pkg server ${build_with_tassl} -pm ${product_mode} ${extra_config_opt} ${build_by_cmake} if [ $? -ne 0 ]; then echo "build_opengauss.sh failed, aborting." exit 1 diff --git a/build/script/build_opengauss.sh b/build/script/build_opengauss.sh index 7f6fb18a7..f19a0fd7c 100755 --- a/build/script/build_opengauss.sh +++ b/build/script/build_opengauss.sh @@ -29,6 +29,7 @@ function print_help() -s|--symbol_mode whether separate symbol in debug mode, the default value is on. -co|--cmake_opt more cmake options -T|--tassl build with tassl + --cmake build by cmake " } @@ -124,6 +125,10 @@ while [ $# -gt 0 ]; do build_with_tassl="YES" shift 1 ;; + --cmake) + CMAKE_PKG="Y" + shift 1 + ;; *) echo "Internal Error: option processing error: $1" 1>&2 echo "please input right paramtenter, the following command may help you"