Fix linker error for python-test on OS X

Change-Id: I29f13e80614f616d125a62db320ce541d6f8d386
This commit is contained in:
Wes McKinney committed 2017-04-02 11:25:41 -04:00
1 parent 651ea9247c
commit bcc2455fa3
2 files changed
+5 -7

No files matched your search

+4 -6
View File
@@ -148,12 +148,10 @@ if(CMAKE_HOST_WIN32)
set(PYTHON_LIBRARY "${PYTHON_PREFIX}/libs/libpython${PYTHON_LIBRARY_SUFFIX}.a")
endif()
elseif(APPLE)
# Seems to require "-undefined dynamic_lookup" instead of linking
# against the .dylib, otherwise it crashes. This flag is added
# below
set(PYTHON_LIBRARY "")
#set(PYTHON_LIBRARY
# "${PYTHON_PREFIX}/lib/libpython${PYTHON_LIBRARY_SUFFIX}.dylib")
# In Python C extensions on OS X, the flag "-undefined dynamic_lookup" can
# avoid certain kinds of dynamic linking issues with portable binaries, so
# you should avoid targeting libpython at link time if at all possible
set(PYTHON_LIBRARY "${PYTHON_PREFIX}/lib/libpython${PYTHON_LIBRARY_SUFFIX}.dylib")
else()
if(${PYTHON_SIZEOF_VOID_P} MATCHES 8)
set(_PYTHON_LIBS_SEARCH "${PYTHON_PREFIX}/lib64" "${PYTHON_PREFIX}/lib" "${PYTHON_LIBRARY_PATH}")
+1 -1
View File
@@ -39,7 +39,7 @@ set(ARROW_PYTHON_MIN_TEST_LIBS
arrow_io_static
arrow_static)
if(NOT APPLE AND ARROW_BUILD_TESTS)
if(ARROW_BUILD_TESTS)
ADD_THIRDPARTY_LIB(python
SHARED_LIB "${PYTHON_LIBRARIES}")
list(APPEND ARROW_PYTHON_MIN_TEST_LIBS python)