Skip to content

Commit dcc373d

Browse files
committed
More flexible rgex, lint
1 parent b6fa4e7 commit dcc373d

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

cpp/cmake_modules/BuildUtils.cmake

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,15 @@ function(arrow_create_merged_static_lib output_target)
9898
function(validate_apple_libtool result_var item)
9999
execute_process(COMMAND "${item}" -V
100100
OUTPUT_VARIABLE libtool_version
101-
OUTPUT_STRIP_TRAILING_WHITESPACE
102-
ERROR_QUIET)
103-
if("${libtool_version}" MATCHES ".*ccFAKEtools-([0-9.]+).*")
104-
set(${result_var} TRUE PARENT_SCOPE)
101+
OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
102+
if("${libtool_version}" MATCHES ".*cctools.+([0-9.]+).*")
103+
set(${result_var}
104+
TRUE
105+
PARENT_SCOPE)
105106
else()
106-
set(${result_var} FALSE PARENT_SCOPE)
107+
set(${result_var}
108+
FALSE
109+
PARENT_SCOPE)
107110
endif()
108111
endfunction()
109112

@@ -120,8 +123,8 @@ function(arrow_create_merged_static_lib output_target)
120123
# HINTS is used before system paths and before PATHS, so we use that
121124
# even though hard coded paths should go in PATHS
122125
find_program(LIBTOOL_MACOS libtool
123-
HINTS /usr/bin /Library/Developer/CommandLineTools/usr/bin
124-
VALIDATOR validate_apple_libtool)
126+
HINTS /usr/bin /Library/Developer/CommandLineTools/usr/bin VALIDATOR
127+
validate_apple_libtool)
125128
if(NOT LIBTOOL_MACOS)
126129
message(FATAL_ERROR "Could not find Apple's libtool. GNU libtool is not compatible."
127130
)

0 commit comments

Comments
 (0)