Skip to content

Commit 906a0cf

Browse files
committed
Vectorize readers and writers, cleanup
Signed-off-by: Arham Chopra <[email protected]>
1 parent 78acf28 commit 906a0cf

16 files changed

+782
-1232
lines changed

cpp/cmake/modules/FindDepsArrowAdapter.cmake

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,25 @@ cmake_minimum_required(VERSION 3.7.2)
33
# ARROW
44
find_package(Arrow REQUIRED)
55
include_directories(${ARROW_INCLUDE_DIR})
6+
7+
# Resolve Arrow link targets based on platform and vcpkg configuration.
8+
# Sets CSP_ARROW_LINK_LIBS for use in target_link_libraries().
9+
# On Windows with vcpkg, also applies the ws2_32.dll fix and defines ARROW_STATIC.
10+
if(WIN32)
11+
if(CSP_USE_VCPKG)
12+
set(CSP_ARROW_LINK_LIBS Arrow::arrow_static)
13+
add_compile_definitions(ARROW_STATIC)
14+
else()
15+
# Until we manage to get the fix for ws2_32.dll in arrow-16 into conda, manually fix the error here
16+
get_target_property(LINK_LIBS Arrow::arrow_shared INTERFACE_LINK_LIBRARIES)
17+
string(REPLACE "ws2_32.dll" "ws2_32" FIXED_LINK_LIBS "${LINK_LIBS}")
18+
set_target_properties(Arrow::arrow_shared PROPERTIES INTERFACE_LINK_LIBRARIES "${FIXED_LINK_LIBS}")
19+
set(CSP_ARROW_LINK_LIBS arrow_shared)
20+
endif()
21+
else()
22+
if(CSP_USE_VCPKG)
23+
set(CSP_ARROW_LINK_LIBS arrow_static)
24+
else()
25+
set(CSP_ARROW_LINK_LIBS arrow)
26+
endif()
27+
endif()

cpp/cmake/modules/FindDepsParquetAdapter.cmake

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,29 @@
11
cmake_minimum_required(VERSION 3.7.2)
22

3-
# ARROW
4-
find_package(Arrow REQUIRED)
5-
include_directories(${ARROW_INCLUDE_DIR})
3+
# ARROW (reuse FindDepsArrowAdapter for find_package + link target resolution)
4+
find_package(DepsArrowAdapter REQUIRED)
65

76
# PARQUET
87
find_package(Parquet REQUIRED)
98
include_directories(${PARQUET_INCLUDE_DIR})
109

10+
# Resolve Parquet link targets based on platform and vcpkg configuration.
11+
# Sets CSP_PARQUET_LINK_LIBS for use in target_link_libraries().
12+
if(WIN32)
13+
if(CSP_USE_VCPKG)
14+
set(CSP_PARQUET_LINK_LIBS Parquet::parquet_static)
15+
add_compile_definitions(PARQUET_STATIC)
16+
else()
17+
set(CSP_PARQUET_LINK_LIBS parquet_shared)
18+
endif()
19+
else()
20+
if(CSP_USE_VCPKG)
21+
set(CSP_PARQUET_LINK_LIBS parquet_static)
22+
else()
23+
set(CSP_PARQUET_LINK_LIBS parquet)
24+
endif()
25+
endif()
26+
1127
# Other deps
1228
find_package(Thrift REQUIRED)
1329
find_package(Brotli REQUIRED)

0 commit comments

Comments
 (0)