-
Notifications
You must be signed in to change notification settings - Fork 0
Build ODBC statically on macOS #153
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1114,6 +1114,11 @@ function(build_boost) | |
| else() | ||
| list(APPEND BOOST_EXCLUDE_LIBRARIES uuid) | ||
| endif() | ||
| if(ARROW_FLIGHT_SQL_ODBC) | ||
| list(APPEND BOOST_INCLUDE_LIBRARIES beast xpressive) | ||
| else() | ||
| list(APPEND BOOST_EXCLUDE_LIBRARIES beast xpressive) | ||
| endif() | ||
| set(BOOST_SKIP_INSTALL_RULES ON) | ||
| if(NOT ARROW_ENABLE_THREADING) | ||
| set(BOOST_UUID_LINK_LIBATOMIC OFF) | ||
|
|
@@ -3023,8 +3028,8 @@ function(build_cares) | |
| if(APPLE) | ||
| # libresolv must be linked from c-ares version 1.16.1 | ||
| find_library(LIBRESOLV_LIBRARY NAMES resolv libresolv REQUIRED) | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Without this change, we have failed run with Fixes error: |
||
| set_target_properties(c-ares::cares PROPERTIES INTERFACE_LINK_LIBRARIES | ||
| "${LIBRESOLV_LIBRARY}") | ||
| set_target_properties(c-ares PROPERTIES INTERFACE_LINK_LIBRARIES | ||
| "${LIBRESOLV_LIBRARY}") | ||
| endif() | ||
|
|
||
| set(ARROW_BUNDLED_STATIC_LIBS | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,7 +15,7 @@ | |
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| add_library(arrow_odbc_spi_impl | ||
| add_library(arrow_odbc_spi_impl STATIC | ||
| accessors/binary_array_accessor.cc | ||
| accessors/binary_array_accessor.h | ||
| accessors/boolean_array_accessor.cc | ||
|
|
@@ -133,8 +133,11 @@ endif() | |
| if(APPLE) | ||
| target_include_directories(arrow_odbc_spi_impl SYSTEM BEFORE PUBLIC ${ODBC_INCLUDE_DIR}) | ||
| target_link_libraries(arrow_odbc_spi_impl | ||
| PUBLIC arrow_flight_sql_shared arrow_compute_shared Boost::locale | ||
| iodbc) | ||
| PUBLIC arrow_flight_sql_static | ||
| arrow_compute_static | ||
| Boost::locale | ||
| Boost::headers | ||
| RapidJSON) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't need iodbc anymore?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. moved |
||
| else() | ||
| find_package(ODBC REQUIRED) | ||
| target_include_directories(arrow_odbc_spi_impl PUBLIC ${ODBC_INCLUDE_DIR}) | ||
|
|
@@ -143,14 +146,6 @@ else() | |
| ${ODBCINST}) | ||
| endif() | ||
|
|
||
| set_target_properties(arrow_odbc_spi_impl | ||
| PROPERTIES ARCHIVE_OUTPUT_DIRECTORY | ||
| ${CMAKE_BINARY_DIR}/$<CONFIG>/lib | ||
| LIBRARY_OUTPUT_DIRECTORY | ||
| ${CMAKE_BINARY_DIR}/$<CONFIG>/lib | ||
| RUNTIME_OUTPUT_DIRECTORY | ||
| ${CMAKE_BINARY_DIR}/$<CONFIG>/lib) | ||
|
|
||
| # CLI | ||
| add_executable(arrow_odbc_spi_impl_cli main.cc) | ||
| set_target_properties(arrow_odbc_spi_impl_cli | ||
|
|
@@ -159,6 +154,16 @@ set_target_properties(arrow_odbc_spi_impl_cli | |
| target_link_libraries(arrow_odbc_spi_impl_cli arrow_odbc_spi_impl) | ||
|
|
||
| # Unit tests | ||
|
|
||
| # On Windows, dynamic linking ODBC is supported. | ||
| # On unix systems, static linking ODBC is supported, thus the library linking is static. | ||
| if(WIN32) | ||
| set(ODBC_SPI_IMPL_TEST_LINK_LIBS arrow_flight_testing_shared) | ||
| else() | ||
| # unix | ||
| set(ODBC_SPI_IMPL_TEST_LINK_LIBS arrow_flight_testing_static) | ||
| endif() | ||
|
|
||
| add_arrow_test(odbc_spi_impl_test | ||
| SOURCES | ||
| accessors/boolean_array_accessor_test.cc | ||
|
|
@@ -177,4 +182,4 @@ add_arrow_test(odbc_spi_impl_test | |
| util_test.cc | ||
| EXTRA_LINK_LIBS | ||
| arrow_odbc_spi_impl | ||
| arrow_flight_testing_shared) | ||
| ${ODBC_SPI_IMPL_TEST_LINK_LIBS}) | ||
Uh oh!
There was an error while loading. Please reload this page.