mirror of
https://github.com/apache/arrow.git
synced 2026-10-29 00:56:31 +08:00
ARROW-6309: [C++][Parquet] Stop needless static linking
This commit is contained in:
1 parent
62fd703a4e
commit
4b4fe0991a
5 files changed
+11
-6
No files matched your search
@@ -29,7 +29,7 @@ if(NOT VERSION)
|
||||
endif()
|
||||
|
||||
function(ADD_PARQUET_TEST REL_TEST_NAME)
|
||||
set(options USE_STATIC_LINKING)
|
||||
set(options USE_STATIC_LINKING_WIN32)
|
||||
set(one_value_args)
|
||||
set(multi_value_args EXTRA_DEPENDENCIES LABELS)
|
||||
cmake_parse_arguments(ARG
|
||||
@@ -43,7 +43,7 @@ function(ADD_PARQUET_TEST REL_TEST_NAME)
|
||||
# By default we prefer shared linking with libparquet, as it's faster
|
||||
# and uses less disk space, but in some cases we need to force static
|
||||
# linking (see rationale below).
|
||||
if(ARG_USE_STATIC_LINKING OR ARROW_TEST_LINKAGE STREQUAL "static")
|
||||
if((ARG_USE_STATIC_LINKING_WIN32 AND WIN32) OR ARROW_TEST_LINKAGE STREQUAL "static")
|
||||
add_test_case(${REL_TEST_NAME}
|
||||
STATIC_LINK_LIBS
|
||||
${PARQUET_STATIC_TEST_LINK_LIBS}
|
||||
@@ -320,11 +320,11 @@ add_parquet_test(arrow-test
|
||||
# Those tests need to use static linking as they access thrift-generated
|
||||
# symbols which are not exported by parquet.dll on Windows (PARQUET-1420).
|
||||
add_parquet_test(file_deserialize_test
|
||||
USE_STATIC_LINKING
|
||||
USE_STATIC_LINKING_WIN32
|
||||
SOURCES
|
||||
file_deserialize_test.cc
|
||||
test_util.cc)
|
||||
add_parquet_test(schema_test USE_STATIC_LINKING)
|
||||
add_parquet_test(schema_test USE_STATIC_LINKING_WIN32)
|
||||
|
||||
add_parquet_benchmark(column_io_benchmark)
|
||||
add_parquet_benchmark(encoding_benchmark)
|
||||
|
||||
@@ -19,8 +19,13 @@ if(PARQUET_BUILD_EXECUTABLES)
|
||||
set(PARQUET_TOOLS parquet-dump-schema parquet-reader parquet-scan)
|
||||
|
||||
foreach(TOOL ${PARQUET_TOOLS})
|
||||
add_executable(${TOOL} "${TOOL}.cc")
|
||||
target_link_libraries(${TOOL} parquet_static)
|
||||
string(REGEX REPLACE "-" "_" TOOL_SOURCE ${TOOL})
|
||||
add_executable(${TOOL} "${TOOL_SOURCE}.cc")
|
||||
if(ARROW_BUILD_SHARED)
|
||||
target_link_libraries(${TOOL} parquet_shared)
|
||||
else()
|
||||
target_link_libraries(${TOOL} parquet_static)
|
||||
endif()
|
||||
# Avoid unsetting RPATH when installing
|
||||
set_target_properties(${TOOL} PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
install(TARGETS ${TOOL} ${INSTALL_IS_OPTIONAL}
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user