This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push: new 792307a [CMake] Different cmake build directories for different build types (#3623) (#3629) 792307a is described below commit 792307ae54ee9dbe1be8b7e6fe30b4ef90b2cca9 Author: sduzh <zhuming9...@qq.com> AuthorDate: Wed May 20 21:41:44 2020 +0800 [CMake] Different cmake build directories for different build types (#3623) (#3629) add `CMAKE_BUILD_TYPE` as the suffix of build directory. --- be/CMakeLists.txt | 3 --- build.sh | 12 +++++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt index 4f37075..25d0297 100644 --- a/be/CMakeLists.txt +++ b/be/CMakeLists.txt @@ -29,9 +29,6 @@ endif() project(doris CXX C) # set CMAKE_BUILD_TYPE -if (DEFINED ENV{BUILD_TYPE}) - set(CMAKE_BUILD_TYPE $ENV{BUILD_TYPE}) -endif() if (NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE RELEASE) endif() diff --git a/build.sh b/build.sh index 2d208e9..244f628 100755 --- a/build.sh +++ b/build.sh @@ -154,14 +154,16 @@ cd ${DORIS_HOME} # Clean and build Backend if [ ${BUILD_BE} -eq 1 ] ; then - echo "Build Backend" + CMAKE_BUILD_TYPE=${BUILD_TYPE:-Release} + echo "Build Backend: ${CMAKE_BUILD_TYPE}" + CMAKE_BUILD_DIR=${DORIS_HOME}/be/build_${CMAKE_BUILD_TYPE} if [ ${CLEAN} -eq 1 ]; then - rm -rf ${DORIS_HOME}/be/build/ + rm -rf $CMAKE_BUILD_DIR rm -rf ${DORIS_HOME}/be/output/ fi - mkdir -p ${DORIS_HOME}/be/build/ - cd ${DORIS_HOME}/be/build/ - ${CMAKE_CMD} -DMAKE_TEST=OFF -DWITH_MYSQL=${WITH_MYSQL} -DWITH_LZO=${WITH_LZO} ../ + mkdir -p ${CMAKE_BUILD_DIR} + cd ${CMAKE_BUILD_DIR} + ${CMAKE_CMD} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DMAKE_TEST=OFF -DWITH_MYSQL=${WITH_MYSQL} -DWITH_LZO=${WITH_LZO} ../ make -j${PARALLEL} make install cd ${DORIS_HOME} --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org