Skip to content

Commit

Permalink
Twiddle rpath stuff, remove empty arrow_test_util module
Browse files Browse the repository at this point in the history
  • Loading branch information
wesm committed Mar 9, 2016
1 parent 8cca41a commit 7554539
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 18 deletions.
15 changes: 5 additions & 10 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ if ("$ENV{CMAKE_EXPORT_COMPILE_COMMANDS}" STREQUAL "1")
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
endif()

if(APPLE)
# In newer versions of CMake, this is the default setting
set(CMAKE_MACOSX_RPATH 1)
endif()

find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
Expand Down Expand Up @@ -344,7 +339,7 @@ if(ARROW_BUILD_TESTS)
find_package(GTest REQUIRED)
include_directories(SYSTEM ${GTEST_INCLUDE_DIR})
ADD_THIRDPARTY_LIB(gtest
STATIC_LIB ${GTEST_STATIC_LIB})
STATIC_LIB ${GTEST_STATIC_LIB})
endif()

## Google PerfTools
Expand All @@ -369,7 +364,7 @@ endif()
############################################################
# Linker setup
############################################################
set(ARROW_MIN_TEST_LIBS arrow arrow_test_main arrow_test_util ${ARROW_BASE_LIBS})
set(ARROW_MIN_TEST_LIBS arrow arrow_test_main ${ARROW_BASE_LIBS})
set(ARROW_TEST_LINK_LIBS ${ARROW_MIN_TEST_LIBS})

############################################################
Expand Down Expand Up @@ -469,13 +464,13 @@ if (APPLE)
set_target_properties(arrow
PROPERTIES
BUILD_WITH_INSTALL_RPATH ON
INSTALL_NAME_DIR "@rpath"
)
INSTALL_NAME_DIR "@rpath")
endif()

set_target_properties(arrow
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${BUILD_OUTPUT_ROOT_DIRECTORY}")
LIBRARY_OUTPUT_DIRECTORY "${BUILD_OUTPUT_ROOT_DIRECTORY}"
)
target_link_libraries(arrow ${LIBARROW_LINK_LIBS})

add_subdirectory(src/arrow)
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/arrow/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ install(FILES
# Unit tests
#######################################

set(ARROW_TEST_LINK_LIBS arrow_test_util ${ARROW_MIN_TEST_LIBS})
set(ARROW_TEST_LINK_LIBS ${ARROW_MIN_TEST_LIBS})

ADD_ARROW_TEST(array-test)
2 changes: 0 additions & 2 deletions cpp/src/arrow/util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,12 @@ if (ARROW_BUILD_TESTS)
if (APPLE)
target_link_libraries(arrow_test_main
gtest
arrow_test_util
dl)
set_target_properties(arrow_test_main
PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
else()
target_link_libraries(arrow_test_main
gtest
arrow_test_util
pthread
dl
)
Expand Down
11 changes: 6 additions & 5 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ if (PYARROW_BUILD_TESTS)
find_package(GTest REQUIRED)
include_directories(SYSTEM ${GTEST_INCLUDE_DIR})
ADD_THIRDPARTY_LIB(gtest
STATIC_LIB ${GTEST_STATIC_LIB})
STATIC_LIB ${GTEST_STATIC_LIB})
endif()

## Arrow
Expand Down Expand Up @@ -400,6 +400,10 @@ endif (UNIX)
# Subdirectories
############################################################

if (UNIX)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
endif()

add_subdirectory(src/pyarrow)
add_subdirectory(src/pyarrow/util)

Expand Down Expand Up @@ -429,9 +433,6 @@ endif()
# Setup and build Cython modules
############################################################

set(USE_RELATIVE_RPATH ON)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)

set(CYTHON_EXTENSIONS
array
config
Expand Down Expand Up @@ -472,7 +473,7 @@ foreach(module ${CYTHON_EXTENSIONS})
endwhile(${i} GREATER 0)

# for inplace development for now
set(module_install_rpath "${CMAKE_SOURCE_DIR}/pyarrow/")
# set(module_install_rpath "${CMAKE_SOURCE_DIR}/pyarrow/")

set_target_properties(${module_name} PROPERTIES
INSTALL_RPATH ${module_install_rpath})
Expand Down

0 comments on commit 7554539

Please sign in to comment.