Skip to content

Commit

Permalink
Use RE2 included in the grpc dependencies (#305)
Browse files Browse the repository at this point in the history
* Set re2 dir

* Add re2 to list of dependencies

* Use find_package for RE2
  • Loading branch information
Tabrizian authored Jan 3, 2024
1 parent 8304b63 commit 82d3371
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ if(NOT TRITON_CORE_HEADERS_ONLY)
set(TRITON_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
endif()

set(TRITON_DEPENDS googletest protobuf)
set(TRITON_DEPENDS googletest protobuf re2)
if(${TRITON_ENABLE_GCS})
set(TRITON_DEPENDS ${TRITON_DEPENDS} google-cloud-cpp)
endif() # TRITON_ENABLE_GCS
Expand Down Expand Up @@ -305,6 +305,7 @@ if(NOT TRITON_CORE_HEADERS_ONLY)
-DgRPC_DIR:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/grpc/lib/cmake/grpc
-Dc-ares_DIR:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/c-ares/${LIB_DIR}/cmake/c-ares
-Dabsl_DIR:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/absl/${LIB_DIR}/cmake/absl
-Dre2_DIR:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/re2/${LIB_DIR}/cmake/re2
-Dnlohmann_json_DIR:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/nlohmann_json/${LIB_DIR}/cmake/nlohmann_json
-Dprometheus-cpp_DIR:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/prometheus-cpp/${LIB_DIR}/cmake/prometheus-cpp
-Dgoogle_cloud_cpp_storage_DIR:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/google-cloud-cpp/${LIB_DIR}/cmake/google_cloud_cpp_storage
Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ FOREACH(p ${TRITON_EXTRA_LIB_PATHS})
)
ENDFOREACH(p)

find_library(RE2_LIBRARY NAMES re2)
find_package(re2 REQUIRED)

target_link_libraries(
triton-core
Expand All @@ -461,7 +461,7 @@ target_link_libraries(
triton-common-json # from repo-common
triton-common-table-printer # from repo-common
protobuf::libprotobuf
${RE2_LIBRARY}
re2::re2
Boost::filesystem
)

Expand Down

0 comments on commit 82d3371

Please sign in to comment.