Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(c/driver/shared): created shared util library for drivers #582

Merged
merged 4 commits into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions c/cmake_modules/AdbcDefines.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@ set_target_properties(nanoarrow
"${REPOSITORY_ROOT}/c/vendor/"
POSITION_INDEPENDENT_CODE ON)

# Shared ADBC Driver libraries
add_library(adbc_driver_shared STATIC EXCLUDE_FROM_ALL
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit confusing to name this 'driver_shared' while it's a static library (usually in Arrow libraries that convention means this is a dynamic library). Maybe driver_common?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea that makes more sense

${REPOSITORY_ROOT}/c/driver/shared/utils.c)
set_target_properties(adbc_driver_shared
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${REPOSITORY_ROOT}/c/driver/shared"
POSITION_INDEPENDENT_CODE ON)
target_link_libraries(adbc_driver_shared nanoarrow)

# Set common build options
macro(adbc_configure_target TARGET)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion c/driver/sqlite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ add_arrow_lib(adbc_driver_sqlite
SOURCES
sqlite.c
statement_reader.c
utils.c
OUTPUTS
ADBC_LIBRARIES
CMAKE_PACKAGE_NAME
Expand All @@ -51,9 +50,11 @@ add_arrow_lib(adbc_driver_sqlite
${ADBC_LINK_FLAGS}
SHARED_LINK_LIBS
${SQLite3_LINK_LIBRARIES}
adbc_driver_shared
nanoarrow
STATIC_LINK_LIBS
${SQLite3_LINK_LIBRARIES}
adbc_driver_shared
nanoarrow
${LIBPQ_STATIC_LIBRARIES})
include_directories(SYSTEM ${REPOSITORY_ROOT})
Expand All @@ -78,6 +79,7 @@ if(ADBC_BUILD_TESTS)
../../validation/adbc_validation.cc
../../validation/adbc_validation_util.cc
EXTRA_LINK_LIBS
adbc_driver_shared
nanoarrow
${TEST_LINK_LIBS})
target_compile_features(adbc-driver-sqlite-test PRIVATE cxx_std_17)
Expand Down