diff --git a/.github/workflows/other-os-build.yml b/.github/workflows/other-os-build.yml index be7e090821d..65bee8e621d 100644 --- a/.github/workflows/other-os-build.yml +++ b/.github/workflows/other-os-build.yml @@ -90,7 +90,7 @@ jobs: export PATH=$PATH:`pwd` source /opt/rh/devtoolset-8/enable if [[ "${USE_DEPS_CACHE}" != "true" ]]; then - echo "build thirdparty, make opt is better than nproc?" + echo "build thirdparty, make opt is better than nproc" make thirdparty CMAKE_INSTALL_PREFIX=${OPENMLDB_PREFIX} BUILD_BUNDLE=ON THIRD_PARTY_CMAKE_FLAGS=-DMAKEOPTS=-j8 # 5.8G ./.deps, avail 8G rm -rf .deps/build # GitHub runner disk space is limited @@ -119,10 +119,7 @@ jobs: # rm build/hybridse build/src -rf if [[ "${SQL_JAVASDK_ENABLE}" == "ON" ]]; then echo "build java sdk" - cmake -S . -B `pwd`/build -DCMAKE_PREFIX_PATH=`pwd`/.deps/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DSQL_PYSDK_ENABLE=OFF -DSQL_JAVASDK_ENABLE=ON \ - -DTESTING_ENABLE=OFF -DCMAKE_INSTALL_PREFIX=${OPENMLDB_PREFIX} \ - -DHYBRIDSE_TESTING_ENABLE=OFF -DEXAMPLES_ENABLE=OFF -DEXAMPLES_TESTING_ENABLE=OFF + cmake -S . -B `pwd`/build -DSQL_PYSDK_ENABLE=OFF -DSQL_JAVASDK_ENABLE=ON # if build the whole java, 7.6G ./build, 5.7G ./java, avail 331M # so split it and build native only # 7.6G ./build, 1.8G ./java, avail 5.2G diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ac375c1d9e..9e442e05087 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -116,7 +116,6 @@ if (MAC_TABLET_ENABLE) add_compile_definitions(__mac_tablet__=1) endif () -set(SWIG_DIR ${CMAKE_PREFIX_PATH}/share/swig/4.0.1) find_package(SWIG REQUIRED) include(UseSWIG) diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index bf2560e69f6..8604dc11292 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt @@ -29,7 +29,16 @@ function(add_contrib cmake_folder) endfunction() add_contrib(simdjson) +CMAKE_POLICY(GET CMP0077 var) +if (POLICY CMP0077) + cmake_policy(SET CMP0077 NEW) +endif () +set(RAPIDJSON_BUILD_DOC OFF) +set(RAPIDJSON_BUILD_EXAMPLES OFF) +set(RAPIDJSON_BUILD_TESTS OFF) add_contrib(rapidjson) +cmake_policy(SET CMP0077 ${var}) + add_contrib(farmhash) if (BUILD_SHARED_LIBS) diff --git a/steps/centos6_build.sh b/steps/centos6_build.sh index 780d64c7ac6..ae52a811739 100644 --- a/steps/centos6_build.sh +++ b/steps/centos6_build.sh @@ -27,6 +27,10 @@ function tool_install() { echo "tools install" yum install -y bison bison-devel byacc cppunit-devel patch devtoolset-8-gcc devtoolset-8-gcc-c++ echo "ID=centos" > /etc/os-release + if [ -f "bazel" ]; then + echo "bazel exists" + return + fi if [ "$OPENMLDB_SOURCE" == "true" ]; then echo "download bazel from openmldb.ai" curl -SLo bazel https://openmldb.ai/download/legacy/bazel-1.0.0 @@ -71,7 +75,7 @@ if [ -e ".deps/build/src/zetasql-stamp/zetasql-build" ]; then echo "zetasql already exists, skip add patch, if you want, rm .deps/build/src/zetasql-stamp/zetasql-build or whole .deps/build/src/zetasql*" else echo "modify in .deps needs a make first, download&build zetasql first(build will fail)" - cmake -S third-party -B "$(pwd)"/.deps -DSRC_INSTALL_DIR="$(pwd)"/thirdsrc -DDEPS_INSTALL_DIR="$(pwd)"/.deps/usr -DBUILD_BUNDLED=ON + cmake -S third-party -B "$(pwd)"/.deps -DSRC_INSTALL_DIR="$(pwd)"/thirdsrc -DDEPS_INSTALL_DIR="$(pwd)"/.deps/usr -DBUILD_BUNDLED=ON -DMAKEOPTS=-j8 cmake --build "$(pwd)"/.deps --target zetasql echo "add patch in .deps zetasql" sed -i'' "26s/lm'/lm:-lrt'/" .deps/build/src/zetasql/build_zetasql_parser.sh