Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apacheGH-44384: [C++] Use CMAKE_LIBTOOL on macOS (apache#44385)
When a builder sets `CMAKE_LIBTOOL`, use that as the program to bundle dependencies. This matches the behavior of the Windows build. Also make a nitpicky minor update to the error message when a non-Apple libtool is detected. ### Are these changes tested? I did not add a test case for this build configuration. I confirmed the behavior when `CMAKE_LIBTOOL` is set, using this script on a Mac. It creates an ad-hoc libtool wrapper and then passes it as `CMAKE_LIBTOOL`. ``` #!/bin/bash mylibtool=$(mktemp -d)/libtool.sh cat << 'EOF' > "$mylibtool" #!/bin/bash say -v Tom -- "voice-enhanced libtool:" "$@" /usr/bin/libtool "$@" EOF chmod +x "$mylibtool" cmake -GNinja -DARROW_DEPENDENCY_SOURCE=BUNDLED -DCMAKE_LIBTOOL="$mylibtool" -S cpp -B build/ cmake --build build/ ``` I am not sure how to best add a test for this to the repository. ### Are there any user-facing changes? This changes how bundled builds behave when an Apple build-user sets `CMAKE_LIBTOOL` in their CMake invocation. I think the change is a sensible one and wouldn't be surprising to users, but it may break existing builds in environments where /usr/bin/libtool is Apple's libtool, and `CMAKE_LIBTOOL` is set to a non-Apple one. * GitHub Issue: apache#44384 Authored-by: Tom Jakubowski <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
- Loading branch information