Skip to content

Commit

Permalink
Use only find_program + hints
Browse files Browse the repository at this point in the history
  • Loading branch information
jonkeane committed Feb 28, 2024
1 parent 150deb0 commit e1cac51
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions cpp/cmake_modules/BuildUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,13 @@ function(arrow_create_merged_static_lib output_target)
# The apple-distributed libtool is what we want for bundling, but there is
# a GNU libtool that has a namecollision (and happens to be bundled with R, too).
# We are not compatible with GNU libtool, so we need to avoid it.
# TODO: use a VALIDATOR when we require cmake >= 3.25

# check in the obvious places first to find Apple's libtool
# HINTS is used before system paths and before PATHS, so we use that
# even though hard coded paths should go in PATHS
# TODO: use a VALIDATOR when we require cmake >= 3.25
find_program(LIBTOOL_MACOS libtool
PATHS /usr/bin /Library/Developer/CommandLineTools/usr/bin
NO_DEFAULT_PATH)

# if it's not found in obvious places, check on the standard path
if(LIBTOOL_MACOS-NOTFOUND)
set(LIBTOOL_MACOS "libtool")
endif()
HINTS /usr/bin /Library/Developer/CommandLineTools/usr/bin)

# confirm that the libtool we found is not GNU libtool
execute_process(COMMAND ${LIBTOOL_MACOS} -V
Expand Down

0 comments on commit e1cac51

Please sign in to comment.