From 9c20714464d54c32387f99d1a430bd034a18f513 Mon Sep 17 00:00:00 2001 From: "Korn, Uwe" Date: Mon, 4 Feb 2019 13:44:22 +0100 Subject: [PATCH 1/2] ARROW-4471: [C++] Pass AR and RANLIB to all external projects --- cpp/cmake_modules/ThirdpartyToolchain.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake index ff2252528fdf..2a33cbafbff1 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -355,6 +355,14 @@ 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_AR=${CMAKE_RANLIB}) +endif() + if (NOT ARROW_VERBOSE_THIRDPARTY_BUILD) set(EP_LOG_OPTIONS LOG_CONFIGURE 1 From b0608b0a7a360c51c58168a198840aeb94eca55b Mon Sep 17 00:00:00 2001 From: "Korn, Uwe" Date: Mon, 4 Feb 2019 16:07:13 +0100 Subject: [PATCH 2/2] Use linebreaks to separate arguments --- cpp/CMakeLists.txt | 2 ++ cpp/cmake_modules/ThirdpartyToolchain.cmake | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) 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 2a33cbafbff1..5f3b54ca3d92 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -356,11 +356,13 @@ set(EP_COMMON_CMAKE_ARGS ${EP_COMMON_CMAKE_ARGS} -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}) + 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_AR=${CMAKE_RANLIB}) + set(EP_COMMON_CMAKE_ARGS ${EP_COMMON_CMAKE_ARGS} + -DCMAKE_RANLIB=${CMAKE_RANLIB}) endif() if (NOT ARROW_VERBOSE_THIRDPARTY_BUILD)