This is an automated email from the ASF dual-hosted git repository. yangzhg pushed a commit to branch libhdfs3 in repository https://gitbox.apache.org/repos/asf/doris-thirdparty.git
commit 01298cbb07b592dbea67b6d9f463703ad945f630 Author: yangzhg <yangz...@gmail.com> AuthorDate: Tue Jun 7 09:54:53 2022 +0800 add option to disable build test --- CMake/Options.cmake | 1 + CMakeLists.txt | 12 ++++++++---- bootstrap | 5 ++++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CMake/Options.cmake b/CMake/Options.cmake index 8141cab..9f0922e 100644 --- a/CMake/Options.cmake +++ b/CMake/Options.cmake @@ -4,6 +4,7 @@ OPTION(ENABLE_SSE "enable SSE4.2 buildin function" ON) OPTION(ENABLE_FRAME_POINTER "enable frame pointer on 64bit system with flag -fno-omit-frame-pointer, on 32bit system, it is always enabled" ON) OPTION(ENABLE_LIBCPP "using libc++ instead of libstdc++, only valid for clang compiler" OFF) OPTION(ENABLE_BOOST "using boost instead of native compiler c++0x support" OFF) +OPTION(BUILD_TEST "build test files" OFF) INCLUDE (CheckFunctionExists) CHECK_FUNCTION_EXISTS(dladdr HAVE_DLADDR) diff --git a/CMakeLists.txt b/CMakeLists.txt index f49e68d..608fb82 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,9 @@ FIND_PACKAGE(LibXml2 REQUIRED) FIND_PACKAGE(Protobuf REQUIRED) FIND_PACKAGE(KERBEROS REQUIRED) FIND_PACKAGE(GSasl REQUIRED) -FIND_PACKAGE(GoogleTest REQUIRED) +IF(BUILD_TEST) + FIND_PACKAGE(GoogleTest REQUIRED) +ENDIF(BUILD_TEST) INCLUDE_DIRECTORIES(${GoogleTest_INCLUDE_DIR}) LINK_LIBRARIES(${GoogleTest_LIBRARIES}) @@ -30,10 +32,12 @@ IF(OS_LINUX) FIND_PACKAGE(LibUUID REQUIRED) ENDIF(OS_LINUX) -ADD_SUBDIRECTORY(mock) -ADD_SUBDIRECTORY(src) -ADD_SUBDIRECTORY(test) +ADD_SUBDIRECTORY(src) +IF(BUILD_TEST) + ADD_SUBDIRECTORY(mock) + ADD_SUBDIRECTORY(test) +ENDIF(BUILD_TEST) CONFIGURE_FILE(src/libhdfs3.pc.in ${CMAKE_SOURCE_DIR}/src/libhdfs3.pc @ONLY) CONFIGURE_FILE(debian/changelog.in ${CMAKE_SOURCE_DIR}/debian/changelog @ONLY) diff --git a/bootstrap b/bootstrap index 0b312e1..d660dfd 100755 --- a/bootstrap +++ b/bootstrap @@ -53,6 +53,7 @@ Configuration: --enable-boost force to enable boost --enable-coverage enable build with code coverage support --enable-libc++ using libc++ instead of libstdc++, only valid for clang compiler + --with-test enable build with test Dependencies: c/c++ compiler @@ -84,6 +85,7 @@ enable_boost="OFF" enable_coverage="OFF" enable_clang_lib="OFF" enable_sse="ON" +build_test="OFF" while test $# != 0; do case "$1" in --prefix=*) dir=`arg "$1"` @@ -94,6 +96,7 @@ while test $# != 0; do --enable-boost) enable_boost="ON";; --enable-coverage) enable_coverage="ON";; --enable-libc++) enable_clang_lib="ON";; + --with-test) build_test="ON";; --help) usage ;; *) die "Unknown option: $1" ;; esac @@ -137,7 +140,7 @@ ${cmake} -DENABLE_DEBUG=${enable_build} -DCMAKE_INSTALL_PREFIX=${prefix_dirs} \ -DCMAKE_C_COMPILER=${c_compiler} -DCMAKE_CXX_COMPILER=${cxx_compiler} \ -DCMAKE_PREFIX_PATH=${dependency_dir} -DENABLE_BOOST=${enable_boost} \ -DENABLE_COVERAGE=${enable_coverage} -DENABLE_LIBCPP=${enable_clang_lib} \ - -DENABLE_SSE=${enable_sse} ${source_dir} \ + -DENABLE_SSE=${enable_sse} ${source_dir} -DBUILD_TEST=${build_test} \ || die "failed to configure the project" echo 'bootstrap success. Run "make" to build.' --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org