Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions cpp/cmake_modules/DefineOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,13 @@ advised that if this is enabled 'install' will fail silently on components;\
that have not been built"
OFF)

define_option_string(ARROW_GDB_INSTALL_DIR
"Use a custom install directory for GDB plugin.;\
In general, you don't need to specify this because the default;\
(CMAKE_INSTALL_FULL_BINDIR on Windows, CMAKE_INSTALL_FULL_LIBDIR otherwise);\
is reasonable."
"")

option(ARROW_BUILD_CONFIG_SUMMARY_JSON "Summarize build configuration in a JSON file"
ON)

Expand Down
15 changes: 11 additions & 4 deletions cpp/src/arrow/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -659,20 +659,27 @@ add_arrow_lib(arrow
# So it's disabled for now.
if(ARROW_BUILD_SHARED AND NOT WIN32)
configure_file(libarrow_gdb.py.in "${CMAKE_CURRENT_BINARY_DIR}/libarrow_gdb.py" @ONLY)
if(NOT ARROW_GDB_INSTALL_DIR)
if(WIN32)
set(ARROW_GDB_INSTALL_DIR ${CMAKE_INSTALL_FULL_BINDIR})
else()
set(ARROW_GDB_INSTALL_DIR ${CMAKE_INSTALL_FULL_LIBDIR})
endif()
endif()
set(ARROW_GDB_AUTO_LOAD_LIBARROW_GDB_INSTALL FALSE)
if(WIN32)
find_program(cygpath "cygpath")
if(cygpath)
execute_process(COMMAND cygpath "${CMAKE_INSTALL_FULL_BINDIR}"
OUTPUT_VARIABLE MSYS2_CMAKE_INSTALL_FULL_BINDIR
execute_process(COMMAND cygpath "${ARROW_GDB_INSTALL_DIR}"
OUTPUT_VARIABLE MSYS2_ARROW_GDB_INSTALL_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(ARROW_GDB_AUTO_LOAD_LIBARROW_GDB_DIR
"${ARROW_GDB_AUTO_LOAD_DIR}${MSYS2_CMAKE_INSTALL_FULL_BINDIR}")
"${ARROW_GDB_AUTO_LOAD_DIR}${MSYS2_ARROW_GDB_INSTALL_DIR}")
set(ARROW_GDB_AUTO_LOAD_LIBARROW_GDB_INSTALL TRUE)
endif()
else()
set(ARROW_GDB_AUTO_LOAD_LIBARROW_GDB_DIR
"${ARROW_GDB_AUTO_LOAD_DIR}/${CMAKE_INSTALL_FULL_LIBDIR}")
"${ARROW_GDB_AUTO_LOAD_DIR}/${ARROW_GDB_INSTALL_DIR}")
set(ARROW_GDB_AUTO_LOAD_LIBARROW_GDB_INSTALL TRUE)
endif()
if(ARROW_GDB_AUTO_LOAD_LIBARROW_GDB_INSTALL)
Expand Down