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
19 changes: 18 additions & 1 deletion cpp/cmake_modules/BuildUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ function(ADD_ARROW_LIB LIB_NAME)
EXTRA_INCLUDES
PRIVATE_INCLUDES
DEPENDENCIES
DEFINITIONS
SHARED_INSTALL_INTERFACE_LIBS
STATIC_INSTALL_INTERFACE_LIBS
OUTPUT_PATH)
Expand Down Expand Up @@ -247,6 +248,9 @@ function(ADD_ARROW_LIB LIB_NAME)
if(ARG_DEPENDENCIES)
add_dependencies(${LIB_NAME}_objlib ${ARG_DEPENDENCIES})
endif()
if(ARG_DEFINITIONS)
target_compile_definitions(${LIB_NAME}_objlib PRIVATE ${ARG_DEFINITIONS})
endif()
if(ARG_PRECOMPILED_HEADER_LIB)
reuse_precompiled_header_lib(${LIB_NAME}_objlib ${ARG_PRECOMPILED_HEADER_LIB})
endif()
Expand Down Expand Up @@ -297,6 +301,10 @@ function(ADD_ARROW_LIB LIB_NAME)
add_dependencies(${LIB_NAME}_shared ${EXTRA_DEPS})
endif()

if(ARG_DEFINITIONS)
target_compile_definitions(${LIB_NAME}_shared PRIVATE ${ARG_DEFINITIONS})
endif()

if(ARG_PRECOMPILED_HEADER_LIB)
reuse_precompiled_header_lib(${LIB_NAME}_shared ${ARG_PRECOMPILED_HEADER_LIB})
endif()
Expand Down Expand Up @@ -387,6 +395,10 @@ function(ADD_ARROW_LIB LIB_NAME)
add_dependencies(${LIB_NAME}_static ${EXTRA_DEPS})
endif()

if(ARG_DEFINITIONS)
target_compile_definitions(${LIB_NAME}_static PRIVATE ${ARG_DEFINITIONS})
endif()

if(ARG_PRECOMPILED_HEADER_LIB)
reuse_precompiled_header_lib(${LIB_NAME}_static ${ARG_PRECOMPILED_HEADER_LIB})
endif()
Expand Down Expand Up @@ -632,7 +644,8 @@ function(ADD_TEST_CASE REL_TEST_NAME)
LABELS
EXTRA_LABELS
TEST_ARGUMENTS
PREFIX)
PREFIX
DEFINITIONS)
cmake_parse_arguments(ARG
"${options}"
"${one_value_args}"
Expand Down Expand Up @@ -703,6 +716,10 @@ function(ADD_TEST_CASE REL_TEST_NAME)
add_dependencies(${TEST_NAME} ${ARG_EXTRA_DEPENDENCIES})
endif()

if(ARG_DEFINITIONS)
target_compile_definitions(${TEST_NAME} PRIVATE ${ARG_DEFINITIONS})
endif()

if(ARROW_TEST_MEMCHECK AND NOT ARG_NO_VALGRIND)
add_test(${TEST_NAME}
bash
Expand Down
10 changes: 6 additions & 4 deletions cpp/src/plasma/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ add_arrow_lib(plasma
plasma
SOURCES
${PLASMA_SRCS}
DEFINITIONS
"ARROW_EXPORTING"
"_PLASMA_NO_DEPRECATE"
OUTPUTS
PLASMA_LIBRARIES
SHARED_LINK_FLAGS
Expand All @@ -98,10 +101,6 @@ add_arrow_lib(plasma

add_dependencies(plasma ${PLASMA_LIBRARIES})

foreach(LIB_TARGET ${PLASMA_LIBRARIES})
target_compile_definitions(${LIB_TARGET} PRIVATE ARROW_EXPORTING)
endforeach()

# The optimization flag -O3 is suggested by dlmalloc.c, which is #included in
# malloc.cc; we set it here regardless of whether we do a debug or release build.
set_source_files_properties(dlmalloc.cc PROPERTIES COMPILE_FLAGS "-O3")
Expand Down Expand Up @@ -134,6 +133,7 @@ else()
target_link_libraries(plasma-store-server plasma_shared ${PLASMA_LINK_LIBS})
endif()
target_link_libraries(plasma-store-server ${GFLAGS_LIBRARIES})
target_compile_definitions(plasma-store-server PRIVATE _PLASMA_NO_DEPRECATE)
add_dependencies(plasma plasma-store-server)

if(ARROW_RPATH_ORIGIN)
Expand Down Expand Up @@ -190,6 +190,8 @@ function(ADD_PLASMA_TEST REL_TEST_NAME)
"plasma"
LABELS
"plasma-tests"
DEFINITIONS
_PLASMA_NO_DEPRECATE
${ARG_UNPARSED_ARGUMENTS})
endfunction()

Expand Down
4 changes: 4 additions & 0 deletions cpp/src/plasma/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
#include "arrow/gpu/cuda_api.h"
#endif

#ifndef _PLASMA_NO_DEPRECATE
#warning "Plasma is deprecated since Arrow 10.0.0. It will be removed in 12.0.0 or so."
#endif

namespace plasma {

enum class ObjectLocation : int32_t { Local, Remote, NotFound };
Expand Down
3 changes: 3 additions & 0 deletions docs/source/cpp/build_system.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ This is the list of available ones and the respective targets created:
CMake is case-sensitive. The names and variables listed above have to be
spelt exactly that way!

.. warning::
Plasma is deprecated as of Arrow 10.0.0, and will be removed in 12.0.0 or so.

.. seealso::
A Docker-based :doc:`minimal build example <examples/cmake_minimal_build>`.

Expand Down
3 changes: 3 additions & 0 deletions docs/source/developers/cpp/building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,9 @@ build times if they are not required for your application:

* ``-DARROW_IPC=ON``: build the IPC extensions

.. warning::
Plasma is deprecated as of Arrow 10.0.0, and will be removed in 12.0.0 or so.

Optional Targets
~~~~~~~~~~~~~~~~

Expand Down