Skip to content

Commit

Permalink
ARROW-10011: [C++] Make FindRE2.cmake re-entrant
Browse files Browse the repository at this point in the history
Closes #8192 from xhochy/ARROW-10011

Authored-by: Uwe L. Korn <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
  • Loading branch information
xhochy authored and pitrou committed Sep 15, 2020
1 parent 49e5b46 commit 2d3046f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
17 changes: 13 additions & 4 deletions cpp/cmake_modules/FindRE2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,17 @@ endif()
find_package_handle_standard_args(RE2 REQUIRED_VARS RE2_LIB RE2_INCLUDE_DIR)

if(RE2_FOUND)
add_library(RE2::re2 UNKNOWN IMPORTED)
set_target_properties(RE2::re2
PROPERTIES IMPORTED_LOCATION "${RE2_LIB}"
INTERFACE_INCLUDE_DIRECTORIES "${RE2_INCLUDE_DIR}")
if(NOT TARGET RE2::re2)
add_library(RE2::re2 UNKNOWN IMPORTED)
set_target_properties(RE2::re2
PROPERTIES IMPORTED_LOCATION "${RE2_LIB}"
INTERFACE_INCLUDE_DIRECTORIES "${RE2_INCLUDE_DIR}")
endif()
# Some third-party dependencies (namely gRPC) are on the look-out for a lower-case re2 Target.
if(NOT TARGET re2::re2)
add_library(re2::re2 UNKNOWN IMPORTED)
set_target_properties(re2::re2
PROPERTIES IMPORTED_LOCATION "${RE2_LIB}"
INTERFACE_INCLUDE_DIRECTORIES "${RE2_INCLUDE_DIR}")
endif()
endif()
3 changes: 1 addition & 2 deletions r/man/RecordBatch.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions r/man/Table.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2d3046f

Please sign in to comment.