diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index e0dbcd305e92..707514a34cb8 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -58,6 +58,8 @@ include(FindPkgConfig) include(GNUInstallDirs) +cmake_policy(SET CMP0025 NEW) + # Compatibility with CMake 3.1 if(POLICY CMP0054) # http://www.cmake.org/cmake/help/v3.1/policy/CMP0054.html diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake index ff2252528fdf..5f3b54ca3d92 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -355,6 +355,16 @@ set(EP_COMMON_CMAKE_ARGS ${EP_COMMON_CMAKE_ARGS} -DCMAKE_CXX_FLAGS=${EP_CXX_FLAGS} -DCMAKE_CXX_FLAGS_${UPPERCASE_BUILD_TYPE}=${EP_CXX_FLAGS}) +if (CMAKE_AR) + set(EP_COMMON_CMAKE_ARGS ${EP_COMMON_CMAKE_ARGS} + -DCMAKE_AR=${CMAKE_AR}) +endif() + +if (CMAKE_RANLIB) + set(EP_COMMON_CMAKE_ARGS ${EP_COMMON_CMAKE_ARGS} + -DCMAKE_RANLIB=${CMAKE_RANLIB}) +endif() + if (NOT ARROW_VERBOSE_THIRDPARTY_BUILD) set(EP_LOG_OPTIONS LOG_CONFIGURE 1