Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
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
14 changes: 11 additions & 3 deletions c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,17 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)

include(CTest)

add_subdirectory(vendor/fmt EXCLUDE_FROM_ALL)
set_target_properties(fmt PROPERTIES POSITION_INDEPENDENT_CODE ON)
add_subdirectory(vendor/nanoarrow)
if(ADBC_WITH_VENDORED_FMT)
add_subdirectory(vendor/fmt EXCLUDE_FROM_ALL)
set_target_properties(fmt PROPERTIES POSITION_INDEPENDENT_CODE ON)
else()
find_package(fmt REQUIRED)
endif()
if(ADBC_WITH_VENDORED_NANOARROW)
add_subdirectory(vendor/nanoarrow)
else()
find_package(nanoarrow REQUIRED)
endif()
add_subdirectory(driver/common)
add_subdirectory(driver/framework)

Expand Down
4 changes: 4 additions & 0 deletions c/cmake_modules/DefineOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")

define_option(ADBC_GGDB_DEBUG "Pass -ggdb flag to debug builds" ON)

define_option(ADBC_WITH_VENDORED_FMT "Use vendored copy of fmt" ON)

define_option(ADBC_WITH_VENDORED_NANOARROW "Use vendored copy of nanoarrow" ON)

#----------------------------------------------------------------------
set_option_category("Test and benchmark")

Expand Down
8 changes: 6 additions & 2 deletions c/driver/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@
add_library(adbc_driver_common STATIC utils.c)
adbc_configure_target(adbc_driver_common)
set_target_properties(adbc_driver_common PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_include_directories(adbc_driver_common PRIVATE "${REPOSITORY_ROOT}/c/include"
"${REPOSITORY_ROOT}/c/vendor")
target_include_directories(adbc_driver_common PRIVATE "${REPOSITORY_ROOT}/c/include")
if(ADBC_WITH_VENDORED_NANOARROW)
target_include_directories(adbc_driver_common PRIVATE "${REPOSITORY_ROOT}/c/vendor")
else()
target_link_libraries(adbc_driver_common PRIVATE nanoarrow::nanoarrow)
endif()

if(ADBC_BUILD_TESTS)
add_test_case(driver_common_test
Expand Down