kou commented on PR #14403:
URL: https://github.com/apache/arrow/pull/14403#issuecomment-1278168542

   How about adding `-DBUILD_TESTING=OFF` to common CMake arguments instead?
   
   ```diff
   index e9e71328af..7bad61ae1e 100644
   --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
   +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
   @@ -771,6 +771,7 @@ endif()
    set(EP_COMMON_CMAKE_ARGS
        ${EP_COMMON_TOOLCHAIN}
        ${EP_COMMON_CMAKE_ARGS}
   +    -DBUILD_TESTING=OFF
        -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
        -DCMAKE_C_FLAGS=${EP_C_FLAGS}
        -DCMAKE_C_FLAGS_${UPPERCASE_BUILD_TYPE}=${EP_C_FLAGS}
   @@ -2687,8 +2688,8 @@ macro(build_absl)
      set(absl_VERSION ${ARROW_ABSL_BUILD_VERSION})
      set(ABSL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/absl_ep-install")
      set(ABSL_INCLUDE_DIR "${ABSL_PREFIX}/include")
   -  set(ABSL_CMAKE_ARGS "${EP_COMMON_CMAKE_ARGS}" -DABSL_RUN_TESTS=OFF
   -                      -DCMAKE_INSTALL_LIBDIR=lib 
"-DCMAKE_INSTALL_PREFIX=${ABSL_PREFIX}")
   +  set(ABSL_CMAKE_ARGS "${EP_COMMON_CMAKE_ARGS}" -DCMAKE_INSTALL_LIBDIR=lib
   +                      "-DCMAKE_INSTALL_PREFIX=${ABSL_PREFIX}")
      set(ABSL_BUILD_BYPRODUCTS)
      set(ABSL_LIBRARIES)
    
   ```
   
   `BUILD_TESTING` is a common CMake option that is used by CTest. 
`include(CTest)` provides `BUILD_TESTING`: 
https://cmake.org/cmake/help/latest/module/CTest.html
   
   FYI: Our bundled Abseil disables its test by default: 
https://github.com/abseil/abseil-cpp/blob/20211102.0/CMakeLists.txt#L49-L51
   So build time will not be changed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to