From 94f464d3e3814b7cf59be3f771019f195355e4e5 Mon Sep 17 00:00:00 2001 From: PHILO-HE Date: Tue, 16 Jul 2024 09:31:04 +0800 Subject: [PATCH] Fix build --- .github/workflows/macos.yml | 2 +- CMake/resolve_dependency_modules/hyperscan.cmake | 2 ++ velox/functions/lib/CMakeLists.txt | 2 +- velox/functions/lib/HyperscanFunctions.cpp | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index ee2d15829c45..d56df273a1f6 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -64,7 +64,7 @@ jobs: brew install \ bison boost ccache double-conversion flex fmt gflags glog \ icu4c libevent libsodium lz4 lzo ninja openssl protobuf@21 \ - range-v3 simdjson snappy thrift xz xsimd zstd + range-v3 simdjson snappy thrift xz xsimd zstd libtool echo "NJOBS=`sysctl -n hw.ncpu`" >> $GITHUB_ENV brew unlink protobuf || echo "protobuf not installed" diff --git a/CMake/resolve_dependency_modules/hyperscan.cmake b/CMake/resolve_dependency_modules/hyperscan.cmake index 3c33ab78f21e..2e59f9a4b99b 100644 --- a/CMake/resolve_dependency_modules/hyperscan.cmake +++ b/CMake/resolve_dependency_modules/hyperscan.cmake @@ -82,4 +82,6 @@ set(CMAKE_CXX_STANDARD 11) set(BUILD_EXAMPLES FALSE) set(BUILD_AVX512 ON) FetchContent_MakeAvailable(hyperscan) +set_target_properties(hs PROPERTIES INTERFACE_INCLUDE_DIRECTORIES + ${hyperscan_SOURCE_DIR}/src) set(CMAKE_CXX_STANDARD ${CMAKE_CXX_STANDARD_BACKUP}) diff --git a/velox/functions/lib/CMakeLists.txt b/velox/functions/lib/CMakeLists.txt index e1a65959222f..4515e05067b9 100644 --- a/velox/functions/lib/CMakeLists.txt +++ b/velox/functions/lib/CMakeLists.txt @@ -40,7 +40,7 @@ add_library( TimeUtils.cpp) target_link_libraries(velox_functions_lib velox_functions_util velox_vector - re2::re2 Folly::folly hyperscan) + re2::re2 Folly::folly hs) add_subdirectory(aggregates) add_subdirectory(string) diff --git a/velox/functions/lib/HyperscanFunctions.cpp b/velox/functions/lib/HyperscanFunctions.cpp index 59182eb1dd48..2618e437321b 100644 --- a/velox/functions/lib/HyperscanFunctions.cpp +++ b/velox/functions/lib/HyperscanFunctions.cpp @@ -15,10 +15,10 @@ */ #include "velox/functions/lib/HyperscanFunctions.h" #include -#include #include #include #include +#include "hs.h" #include "velox/functions/lib/string/StringImpl.h" #include "velox/vector/FunctionVector.h"