Skip to content

Commit

Permalink
ARROW-8003: [C++] Use CMAKE_C_COMPILER when building bundled bzip2
Browse files Browse the repository at this point in the history
This fixes `bzip2_ep` when building with clang

Closes #6539 from wesm/ARROW-8003 and squashes the following commits:

b5a6d56 <Wes McKinney> Use CMAKE_C_COMPILER when building bundled bzip2

Authored-by: Wes McKinney <wesm+git@apache.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
  • Loading branch information
wesm authored and kou committed Mar 5, 2020
1 parent 8eddf3c commit 6fa6c91
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1906,13 +1906,15 @@ macro(build_bzip2)
BZIP2_STATIC_LIB
"${BZIP2_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}bz2${CMAKE_STATIC_LIBRARY_SUFFIX}")

set(BZIP2_EXTRA_ARGS "CC=${CMAKE_C_COMPILER}" "CFLAGS=${EP_C_FLAGS}")

externalproject_add(bzip2_ep
${EP_LOG_OPTIONS}
CONFIGURE_COMMAND ""
BUILD_IN_SOURCE 1
BUILD_COMMAND ${MAKE} ${MAKE_BUILD_ARGS} CFLAGS=${EP_C_FLAGS}
BUILD_COMMAND ${MAKE} ${MAKE_BUILD_ARGS} ${BZIP2_EXTRA_ARGS}
INSTALL_COMMAND ${MAKE} install PREFIX=${BZIP2_PREFIX}
CFLAGS=${EP_C_FLAGS}
${BZIP2_EXTRA_ARGS}
INSTALL_DIR ${BZIP2_PREFIX}
URL ${BZIP2_SOURCE_URL}
BUILD_BYPRODUCTS "${BZIP2_STATIC_LIB}")
Expand Down

0 comments on commit 6fa6c91

Please sign in to comment.