You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2019/03/14 22:05:52 UTC
[arrow] branch master updated: ARROW-4866: [C++] Fix zstd_ep build
for Debug,
static CRT builds. Add separate CMake variable for propagating compiler
toolchain to ExternalProjects
This is an automated email from the ASF dual-hosted git repository.
wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new 431fc13 ARROW-4866: [C++] Fix zstd_ep build for Debug, static CRT builds. Add separate CMake variable for propagating compiler toolchain to ExternalProjects
431fc13 is described below
commit 431fc13011cd959ecd3ea57b960436e960256f91
Author: Wes McKinney <we...@apache.org>
AuthorDate: Thu Mar 14 17:05:43 2019 -0500
ARROW-4866: [C++] Fix zstd_ep build for Debug, static CRT builds. Add separate CMake variable for propagating compiler toolchain to ExternalProjects
zstd sets a bunch of its own compilation flags and they conflict with the CFLAGS/CXXFLAGS that are part of EP_COMMON_CMAKE_ARGS
Author: Wes McKinney <we...@apache.org>
Closes #3905 from wesm/ARROW-4866 and squashes the following commits:
de7c0ae6 <Wes McKinney> Pass EP compiler toolchain as separate variable. Do not override CFLAGS and CXXFLAGS for zstd_ep
---
cpp/cmake_modules/ThirdpartyToolchain.cmake | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index baefc6b..89fd7a6 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -350,30 +350,30 @@ endif()
# directory. This leads to issues if the variables are exported in a subshell
# and the invocation of make/ninja is in distinct subshell without the same
# environment (CC/CXX).
-set(EP_COMMON_CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
- -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER})
+set(EP_COMMON_TOOLCHAIN -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
+ -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER})
+
+if (CMAKE_AR)
+ set(EP_COMMON_TOOLCHAIN ${EP_COMMON_TOOLCHAIN}
+ -DCMAKE_AR=${CMAKE_AR})
+endif()
+
+if (CMAKE_RANLIB)
+ set(EP_COMMON_TOOLCHAIN ${EP_COMMON_TOOLCHAIN}
+ -DCMAKE_RANLIB=${CMAKE_RANLIB})
+endif()
# External projects are still able to override the following declarations.
# cmake command line will favor the last defined variable when a duplicate is
# encountered. This requires that `EP_COMMON_CMAKE_ARGS` is always the first
# argument.
-set(EP_COMMON_CMAKE_ARGS ${EP_COMMON_CMAKE_ARGS}
+set(EP_COMMON_CMAKE_ARGS ${EP_COMMON_TOOLCHAIN}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_C_FLAGS=${EP_C_FLAGS}
-DCMAKE_C_FLAGS_${UPPERCASE_BUILD_TYPE}=${EP_C_FLAGS}
-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
@@ -1438,7 +1438,7 @@ macro(build_zstd)
message(STATUS "Building zstd from source")
set(ZSTD_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/zstd_ep-install")
- set(ZSTD_CMAKE_ARGS ${EP_COMMON_CMAKE_ARGS}
+ set(ZSTD_CMAKE_ARGS ${EP_COMMON_TOOLCHAIN}
"-DCMAKE_INSTALL_PREFIX=${ZSTD_PREFIX}"
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR}