Skip to content

Commit f2c3df4

Browse files
aphecetchektf
authored andcommitted
Detect arrow 0.16 as well as 0.14
1 parent 0955bd3 commit f2c3df4

3 files changed

Lines changed: 40 additions & 27 deletions

File tree

dependencies/FindO2arrow.cmake

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Copyright CERN and copyright holders of ALICE O2. This software is distributed
2+
# under the terms of the GNU General Public License v3 (GPL Version 3), copied
3+
# verbatim in the file "COPYING".
4+
#
5+
# See http://alice-o2.web.cern.ch/license for full licensing information.
6+
#
7+
# In applying this license CERN does not waive the privileges and immunities
8+
# granted to it by virtue of its status as an Intergovernmental Organization or
9+
# submit itself to any jurisdiction.
10+
11+
# Simply provide a namespaced alias for the existing target
12+
13+
find_package(Arrow CONFIG QUIET)
14+
if(NOT Arrow_FOUND)
15+
find_package(arrow CONFIG QUIET)
16+
set(Arrow_DIR ${arrow_DIR})
17+
endif()
18+
find_package(Gandiva CONFIG PATHS ${Arrow_DIR} QUIET)
19+
20+
if(TARGET arrow_shared)
21+
# Promote the imported target to global visibility (so we can alias it)
22+
set_target_properties(arrow_shared PROPERTIES IMPORTED_GLOBAL TRUE)
23+
add_library(arrow::arrow_shared ALIAS arrow_shared)
24+
set(arrow_TARGET ON)
25+
endif()
26+
27+
if(TARGET gandiva_shared)
28+
# Promote the imported target to global visibility (so we can alias it)
29+
set_target_properties(gandiva_shared PROPERTIES IMPORTED_GLOBAL TRUE)
30+
add_library(arrow::gandiva_shared ALIAS gandiva_shared)
31+
set(gandiva_TARGET ON)
32+
endif()
33+
34+
include(FindPackageHandleStandardArgs)
35+
find_package_handle_standard_args(O2arrow REQUIRED_VARS arrow_TARGET gandiva_TARGET)
36+
37+
unset(arrow_TARGET)
38+
unset(gandiva_TARGET)

dependencies/Findarrow.cmake

Lines changed: 0 additions & 25 deletions
This file was deleted.

dependencies/O2Dependencies.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ include(FeatureSummary)
3636

3737
include(FindThreads)
3838

39-
find_package(arrow MODULE)
40-
set_package_properties(arrow PROPERTIES TYPE REQUIRED)
39+
find_package(O2arrow MODULE)
40+
set_package_properties(O2arrow PROPERTIES TYPE REQUIRED)
4141

4242
find_package(Vc)
4343
set_package_properties(Vc PROPERTIES TYPE REQUIRED)

0 commit comments

Comments
 (0)