2020-04-30 13:49:35 +02:00
#set(PLUGIN_COLUMNSTORE "NO" CACHE STRING "Enable ColumnStore engine")
2019-11-27 15:34:14 +01:00
2024-04-01 23:14:17 +02:00
if("NO" STREQUAL "${PLUGIN_COLUMNSTORE}" OR
2024-04-03 15:39:36 +02:00
(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/columnstore/CMakeLists.txt))
2019-11-27 15:34:14 +01:00
return()
endif()
2021-05-17 21:24:20 +02:00
add_definitions(-DBOOST_BIND_GLOBAL_PLACEHOLDERS)
2022-03-17 12:13:19 +01:00
IF(NOT PLUGIN_PERFSCHEMA STREQUAL NO)
add_definitions(-DHAVE_PSI_INTERFACE=)
ENDIF()
2023-05-25 11:42:25 +02:00
# new gcc is quite buggy re. spurious warnings. let's shut it up
IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_GREATER "12.0.0")
# 12
MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-error=restrict")
MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-error=use-after-free")
# 13
MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-error=maybe-uninitialized")
MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-error=dangling-reference")
MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-error=dangling-pointer")
ENDIF()
MY_CHECK_AND_SET_COMPILER_FLAG("-fno-strict-aliasing")
2024-05-21 19:38:51 +02:00
# let's temporarily disable the warning, until ColumnStore is fixed
MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-error=calloc-transposed-args")
2023-05-25 11:42:25 +02:00
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed")
2021-05-17 21:24:20 +02:00
2020-06-29 16:40:55 +02:00
# this does everything, gets the var from the correct scope, appends new
# values, sets in the correct scope
macro(APPEND_FOR_CPACK V)
get_directory_property(var DIRECTORY columnstore DEFINITION ${V})
set(${V} "${var}${ARGN}" PARENT_SCOPE)
endmacro()
2022-02-04 14:11:46 +01:00
# don't use compression providers, there are standalone executables below
GET_PROPERTY(dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
LIST(REMOVE_ITEM dirs ${CMAKE_SOURCE_DIR}/include/providers)
SET_PROPERTY(DIRECTORY PROPERTY INCLUDE_DIRECTORIES "${dirs}")
2020-06-13 21:39:22 +02:00
IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR
2021-01-30 08:50:14 +01:00
CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64" OR
CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
2020-06-13 21:39:22 +02:00
add_subdirectory(columnstore)
2019-11-27 15:34:14 +01:00
2020-06-17 12:35:14 +02:00
IF(TARGET columnstore)
2023-02-11 20:04:46 +01:00
# Redo logic in cmake/plugin to prevent the attempted creation of *Symlinks package
SET(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} columnstore-engineSymlinks)
SET(CPACK_COMPONENT_COLUMNSTORE-ENGINESYMLINKS_GROUP columnstore-engine PARENT_SCOPE)
SET(CPACK_COMPONENT_COLUMNSTORE-ENGINE_GROUP columnstore-engine PARENT_SCOPE)
2020-06-18 08:10:25 +02:00
# Needed to bump the component changes up to the main scope
2020-06-29 16:40:55 +02:00
APPEND_FOR_CPACK(CPACK_COMPONENTS_ALL)
2020-06-18 08:10:25 +02:00
IF (RPM)
2023-02-11 20:04:46 +01:00
APPEND_FOR_CPACK(CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES " binutils net-tools python3 MariaDB-client-compat MariaDB-server-compat")
2020-08-04 22:55:47 +02:00
APPEND_FOR_CPACK(CPACK_RPM_columnstore-engine_PACKAGE_RECOMMENDS " jemalloc")
2020-06-29 16:40:55 +02:00
APPEND_FOR_CPACK(CPACK_RPM_columnstore-engine_USER_FILELIST ";%ignore /var/lib;%ignore /var")
APPEND_FOR_CPACK(CPACK_RPM_columnstore-engine_PACKAGE_CONFLICTS " thrift MariaDB-columnstore-platform MariaDB-columnstore-libs")
# these three don't have the list semantics, so no append here
SET(CPACK_RPM_columnstore-engine_PRE_INSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/columnstore/build/preInstall_storage_engine.sh PARENT_SCOPE)
SET(CPACK_RPM_columnstore-engine_POST_INSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/columnstore/build/postInstall_storage_engine.sh PARENT_SCOPE)
SET(CPACK_RPM_columnstore-engine_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/columnstore/build/preUn_storage_engine.sh PARENT_SCOPE)
2020-11-30 15:27:08 +01:00
APPEND_FOR_CPACK(CPACK_RPM_columnstore-engine_PACKAGE_VERSION "")
2021-12-07 17:29:05 +01:00
SET(CPACK_RPM_columnstore-engine_PACKAGE_SUMMARY "MariaDB ColumnStore storage engine" PARENT_SCOPE)
SET(CPACK_RPM_columnstore-engine_PACKAGE_DESCRIPTION "The MariaDB ColumnStore storage engine is a high-performance columnar analytical engine, aimed at rapid processing of analytical queries on very large amounts of data." PARENT_SCOPE)
2020-06-18 08:10:25 +02:00
ENDIF()
INSTALL_MYSQL_TEST("${CMAKE_CURRENT_SOURCE_DIR}/mysql-test/" "plugin/columnstore")
2020-06-13 21:39:22 +02:00
ENDIF()
2020-05-19 15:20:03 +02:00
ENDIF()