[
https://issues.apache.org/jira/browse/ARROW-1723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16219454#comment-16219454
]
ASF GitHub Bot commented on ARROW-1723:
---------------------------------------
MaxRis commented on a change in pull request #1244: ARROW-1723: [C++] add
ARROW_STATIC to mark static libs on Windows
URL: https://github.com/apache/arrow/pull/1244#discussion_r146974055
##########
File path: cpp/cmake_modules/BuildUtils.cmake
##########
@@ -154,22 +161,28 @@ function(ADD_ARROW_LIB LIB_NAME)
endif()
if (ARROW_BUILD_STATIC)
- if (MSVC)
- set(LIB_NAME_STATIC ${LIB_NAME}_static)
- else()
- set(LIB_NAME_STATIC ${LIB_NAME})
- endif()
- add_library(${LIB_NAME}_static STATIC
$<TARGET_OBJECTS:${LIB_NAME}_objlib>)
+ if (MSVC)
+ set(LIB_NAME_STATIC ${LIB_NAME}_static)
+ else()
+ set(LIB_NAME_STATIC ${LIB_NAME})
+ endif()
+ add_library(${LIB_NAME}_static STATIC ${LIB_DEPS})
+ if(EXTRA_DEPS)
+ add_dependencies(${LIB_NAME}_static ${EXTRA_DEPS})
+ endif()
+
set_target_properties(${LIB_NAME}_static
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${BUILD_OUTPUT_ROOT_DIRECTORY}"
OUTPUT_NAME ${LIB_NAME_STATIC})
- target_link_libraries(${LIB_NAME}_static
+ target_compile_definitions(${LIB_NAME}_static PUBLIC ARROW_STATIC)
Review comment:
@JohnPJenkins To avoid confusion, it might make sense to define this only
for MSVC
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Windows: __declspec(dllexport) specified when building arrow static library
> ---------------------------------------------------------------------------
>
> Key: ARROW-1723
> URL: https://issues.apache.org/jira/browse/ARROW-1723
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++
> Reporter: John Jenkins
> Labels: pull-request-available
>
> As I understand it, dllexport/dllimport should be left out when building and
> using static libraries on Windows. A PR will follow shortly.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)