You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by uw...@apache.org on 2019/01/26 16:00:38 UTC
[arrow] branch master updated: ARROW-4351: [C++] Fix CMake errors
when neither building shared libraries nor tests
This is an automated email from the ASF dual-hosted git repository.
uwe 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 59c69aa ARROW-4351: [C++] Fix CMake errors when neither building shared libraries nor tests
59c69aa is described below
commit 59c69aa2ec377e03388ff509eb7742e4fd625e01
Author: Wes McKinney <we...@apache.org>
AuthorDate: Sat Jan 26 17:00:17 2019 +0100
ARROW-4351: [C++] Fix CMake errors when neither building shared libraries nor tests
Author: Wes McKinney <we...@apache.org>
Closes #3470 from wesm/ARROW-4351 and squashes the following commits:
019057ab <Wes McKinney> Fix build when neither building shared libraries nor tests and ARROW_PARQUET=ON
---
cpp/CMakeLists.txt | 2 +-
cpp/src/parquet/CMakeLists.txt | 15 +++++++++++----
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index fa69670..736ef84 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -816,7 +816,7 @@ if(NOT MSVC)
${CMAKE_DL_LIBS})
endif()
-if ("${ARROW_TEST_LINKAGE}" STREQUAL "shared")
+if (ARROW_BUILD_TESTS AND "${ARROW_TEST_LINKAGE}" STREQUAL "shared")
if (NOT ARROW_BUILD_SHARED)
message(FATAL_ERROR "If using shared linkage for unit tests, must also \
pass ARROW_BUILD_SHARED=on")
diff --git a/cpp/src/parquet/CMakeLists.txt b/cpp/src/parquet/CMakeLists.txt
index 54007df..9316854 100644
--- a/cpp/src/parquet/CMakeLists.txt
+++ b/cpp/src/parquet/CMakeLists.txt
@@ -213,12 +213,19 @@ if (NOT PARQUET_MINIMAL_DEPENDENCY)
# 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
-set(PARQUET_DEPENDENCIES ${PARQUET_DEPENDENCIES}
- ${PARQUET_SHARED_LINK_LIBS}
- ${PARQUET_SHARED_PRIVATE_LINK_LIBS}
- ${PARQUET_STATIC_LINK_LIBS})
+if (ARROW_BUILD_SHARED)
+ set(PARQUET_DEPENDENCIES ${PARQUET_DEPENDENCIES}
+ ${PARQUET_SHARED_LINK_LIBS}
+ ${PARQUET_SHARED_PRIVATE_LINK_LIBS})
endif()
+if (ARROW_BUILD_STATIC)
+ set(PARQUET_DEPENDENCIES ${PARQUET_DEPENDENCIES}
+ ${PARQUET_STATIC_LINK_LIBS})
+endif()
+
+endif(NOT PARQUET_MINIMAL_DEPENDENCY)
+
if(NOT APPLE AND NOT MSVC)
# Localize thirdparty symbols using a linker version script. This hides them
# from the client application. The OS X linker does not support the