This is an automated email from the ASF dual-hosted git repository.
wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new a5f5319 ARROW-3234: [C++] Fix libprotobuf shared library link order
a5f5319 is described below
commit a5f5319f62d50b51ba7b084d83da979d9cc6d0ea
Author: Kouhei Sutou <[email protected]>
AuthorDate: Fri Sep 14 14:37:00 2018 -0400
ARROW-3234: [C++] Fix libprotobuf shared library link order
We need to link libprotobuf shared library after liborc.
We should use "-lorc -lprotobuf" instead of "-lprotobuf -lorc".
If we use libprotobuf as static library, we can control link order by
ARROW_STATIC_LINK_LIBS. But we can't control link order when we use
libprotobuf as shared library by variables.
We need to tell CMake link order.
Author: Kouhei Sutou <[email protected]>
Closes #2556 from kou/cpp-fix-protobuf-shared-library-link-order and
squashes the following commits:
09e513154 <Kouhei Sutou> Fix libprotobuf shared library link order
---
cpp/CMakeLists.txt | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index 62415ad..9eb37d2 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -637,18 +637,12 @@ if (ARROW_WITH_GRPC)
endif()
if (ARROW_ORC)
- if (ARROW_PROTOBUF_USE_SHARED)
- SET(ARROW_LINK_LIBS
- protobuf
- ${ARROW_LINK_LIBS})
- else()
- SET(ARROW_STATIC_LINK_LIBS
- protobuf
- ${ARROW_STATIC_LINK_LIBS})
- endif()
SET(ARROW_STATIC_LINK_LIBS
- orc
- ${ARROW_STATIC_LINK_LIBS})
+ ${ARROW_STATIC_LINK_LIBS}
+ orc)
+ set_target_properties(orc
+ PROPERTIES INTERFACE_LINK_LIBRARIES
+ protobuf)
endif()
if (ARROW_STATIC_LINK_LIBS)