parquet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject parquet-cpp git commit: PARQUET-892: Specify public link targets for parquet_static so that transitive dependencies are linked in executables
Date Thu, 23 Feb 2017 08:22:38 GMT
Repository: parquet-cpp
Updated Branches:
  refs/heads/master 54a0ad01c -> 80f50fcca


PARQUET-892: Specify public link targets for parquet_static so that transitive dependencies
are linked in executables

Author: Wes McKinney <wes.mckinney@twosigma.com>

Closes #259 from wesm/PARQUET-892 and squashes the following commits:

1e932c4 [Wes McKinney] Specify public link targets for parquet_static so that transitive dependencies
are linked in executables


Project: http://git-wip-us.apache.org/repos/asf/parquet-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/parquet-cpp/commit/80f50fcc
Tree: http://git-wip-us.apache.org/repos/asf/parquet-cpp/tree/80f50fcc
Diff: http://git-wip-us.apache.org/repos/asf/parquet-cpp/diff/80f50fcc

Branch: refs/heads/master
Commit: 80f50fccad51a87d3272ca9de5d11ce8f6f26187
Parents: 54a0ad0
Author: Wes McKinney <wes.mckinney@twosigma.com>
Authored: Thu Feb 23 09:22:06 2017 +0100
Committer: Uwe L. Korn <uwe@apache.org>
Committed: Thu Feb 23 09:22:06 2017 +0100

----------------------------------------------------------------------
 CMakeLists.txt          | 19 ++++++++-----------
 examples/CMakeLists.txt |  7 +------
 tools/CMakeLists.txt    | 13 +++----------
 3 files changed, 12 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/80f50fcc/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8edebc9..d9a03e5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -548,9 +548,6 @@ set(LIBPARQUET_SRCS
   src/parquet/util/memory.cc
 )
 
-set(LIBPARQUET_LINK_LIBS
-)
-
 set(BUNDLED_STATIC_LIBS
   brotlistatic_dec
   brotlistatic_enc
@@ -560,8 +557,11 @@ set(BUNDLED_STATIC_LIBS
   zlibstatic
 )
 
-# Shared library linked libs
-set(LIBPARQUET_PRIVATE_LINK_LIBS
+# These are libraries that we will link privately with parquet_shared (as they
+# do not need to be linked transitively by other linkers), but publicly with
+# parquet_static (because internal users need to transitively link all
+# dependencies)
+set(LIBPARQUET_INTERFACE_LINK_LIBS
   ${ARROW_LINK_LIBS}
   ${BOOST_LINK_LIBS}
   ${BUNDLED_STATIC_LIBS}
@@ -580,8 +580,7 @@ add_dependencies(parquet_objlib thrift-deps)
 # Although we don't link parquet_objlib against anything, we need it to depend
 # on these libs as we may generate their headers via ExternalProject_Add
 add_dependencies(parquet_objlib
-  ${LIBPARQUET_LINK_LIBS}
-  ${LIBPARQUET_PRIVATE_LINK_LIBS})
+  ${LIBPARQUET_INTERFACE_LINK_LIBS})
 
 set_property(TARGET parquet_objlib PROPERTY POSITION_INDEPENDENT_CODE 1)
 
@@ -602,8 +601,7 @@ if (PARQUET_BUILD_SHARED)
       LINK_FLAGS "${SHARED_LINK_FLAGS}"
       OUTPUT_NAME "parquet")
     target_link_libraries(parquet_shared
-      LINK_PUBLIC ${LIBPARQUET_LINK_LIBS}
-      LINK_PRIVATE ${LIBPARQUET_PRIVATE_LINK_LIBS})
+      LINK_PRIVATE ${LIBPARQUET_INTERFACE_LINK_LIBS})
     if (APPLE)
       set_target_properties(parquet_shared
         PROPERTIES
@@ -619,8 +617,7 @@ if (PARQUET_BUILD_STATIC)
       LIBRARY_OUTPUT_DIRECTORY "${BUILD_OUTPUT_ROOT_DIRECTORY}"
       OUTPUT_NAME "parquet")
     target_link_libraries(parquet_static
-      LINK_PUBLIC ${LIBPARQUET_LINK_LIBS}
-      LINK_PRIVATE ${LIBPARQUET_PRIVATE_LINK_LIBS})
+      LINK_PUBLIC ${LIBPARQUET_INTERFACE_LINK_LIBS})
 endif()
 
 add_subdirectory(src/parquet)

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/80f50fcc/examples/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 204cc27..721fa9a 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -15,12 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-SET(LINK_LIBS
-  snappystatic
-  thriftstatic)
-
 if (PARQUET_BUILD_EXECUTABLES)
   add_executable(reader-writer reader-writer.cc)
-  target_link_libraries(reader-writer ${LINK_LIBS}
-	parquet_static)
+  target_link_libraries(reader-writer parquet_static)
 endif()

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/80f50fcc/tools/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 5c4eaa8..d473d08 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -15,20 +15,13 @@
 # specific language governing permissions and limitations
 # under the License.
 
-SET(LINK_LIBS
-  snappystatic
-  thriftstatic)
-
 if (PARQUET_BUILD_EXECUTABLES)
   add_executable(parquet-dump-schema parquet-dump-schema.cc)
-  target_link_libraries(parquet-dump-schema ${LINK_LIBS}
-	parquet_static)
+  target_link_libraries(parquet-dump-schema parquet_static)
 
   add_executable(parquet_reader parquet_reader.cc)
-  target_link_libraries(parquet_reader ${LINK_LIBS}
-	parquet_static)
+  target_link_libraries(parquet_reader parquet_static)
 
   add_executable(parquet-scan parquet-scan.cc)
-  target_link_libraries(parquet-scan ${LINK_LIBS}
-	parquet_static)
+  target_link_libraries(parquet-scan parquet_static)
 endif()


Mime
View raw message