1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

chore(build): refactor main CMakeLists.txt (#3543)

* chore(build): refactor main CMakeLists.txt

* chore(build): fix boost version for packages, set clang-20 only for amd and arm

* chore(build): boost 4 sm

* chore(build): boost dep for rowgroup

* chore(build): toolset for boost

* chore(build): suppress clang warnings for boost

* chore(ci, build): use ASAN for unittest on ubuntu 24.04 only, added custom cmake flag option for bootstrap, custom params for new and existing pipelines

* chore(build): sort bootstrap flags

* chore(CI): remove publish pkg step, adding clickable link instead to publish steps, fix customenv
This commit is contained in:
Leonid Fedorov
2025-05-20 05:00:48 +04:00
committed by GitHub
parent e0f3bf8322
commit a1019b7c0e
26 changed files with 2089 additions and 1767 deletions

View File

@ -1,15 +1,17 @@
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/install_mcs_mysql.sh.in" "${CMAKE_CURRENT_SOURCE_DIR}/install_mcs_mysql.sh" @ONLY)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/install_mcs_mysql.sh.in" "${CMAKE_CURRENT_SOURCE_DIR}/install_mcs_mysql.sh" @ONLY
)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ha_mcs_version.h.in" "${CMAKE_CURRENT_SOURCE_DIR}/ha_mcs_version.h")
include_directories( ${ENGINE_COMMON_INCLUDES}
/usr/include/libxml2
${SERVER_SOURCE_ROOT_DIR}/storage/maria )
include_directories(${ENGINE_COMMON_INCLUDES} /usr/include/libxml2 ${SERVER_SOURCE_ROOT_DIR}/storage/maria)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../../../)
SET(S3API_DEPS marias3 curl CACHE INTERNAL "S3API_DEPS")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../../../)
set(S3API_DEPS
marias3 curl
CACHE INTERNAL "S3API_DEPS"
)
SET ( libcalmysql_SRCS
set(libcalmysql_SRCS
../../datatypes/mcs_datatype.cpp
../../utils/libmysql_client/libmysql_client.cpp
../../utils/querystats/querystats.cpp
@ -27,7 +29,8 @@ SET ( libcalmysql_SRCS
ha_exists_sub.cpp
ha_from_sub.cpp
ha_select_sub.cpp
ha_view.cpp sm.cpp
ha_view.cpp
sm.cpp
ha_window_function.cpp
ha_mcs_partition.cpp
ha_pseudocolumn.cpp
@ -36,45 +39,82 @@ SET ( libcalmysql_SRCS
is_columnstore_columns.cpp
is_columnstore_files.cpp
is_columnstore_extents.cpp
columnstore_dataload.cpp)
columnstore_dataload.cpp
)
set_source_files_properties(ha_mcs.cpp PROPERTIES COMPILE_FLAGS "-fno-implicit-templates")
if (COMMAND mysql_add_plugin)
IF(NOT(RPM OR DEB))
SET(disabled DISABLED)
ENDIF()
mysql_add_plugin(columnstore ${libcalmysql_SRCS} STORAGE_ENGINE MODULE_ONLY ${disabled}
LINK_LIBRARIES ${ENGINE_LDFLAGS} ${PLUGIN_EXEC_LIBS} ${PLUGIN_WRITE_LIBS} joblist_server ${NETSNMP_LIBRARIES} ${S3API_DEPS} threadpool
VERSION ${PACKAGE_VERSION}
COMPONENT columnstore-engine CONFIG columnstore.cnf)
else ()
if(COMMAND mysql_add_plugin)
if(NOT (RPM OR DEB))
set(disabled DISABLED)
endif()
message("Adding plugin via MariaDB plugin API")
mysql_add_plugin(
columnstore
${libcalmysql_SRCS}
STORAGE_ENGINE
MODULE_ONLY
${disabled}
LINK_LIBRARIES
${ENGINE_LDFLAGS}
${PLUGIN_EXEC_LIBS}
${PLUGIN_WRITE_LIBS}
joblist_server
${NETSNMP_LIBRARIES}
${MARIADB_CLIENT_LIBS}
${S3API_DEPS}
threadpool
VERSION
${PACKAGE_VERSION}
COMPONENT
columnstore-engine
CONFIG
columnstore.cnf
)
else()
message("Adding plugin via CMake")
add_library(ha_columnstore SHARED ${libcalmysql_SRCS})
SET_TARGET_PROPERTIES(ha_columnstore PROPERTIES PREFIX "")
set_target_properties(ha_columnstore PROPERTIES PREFIX "")
add_dependencies(ha_columnstore loggingcpp)
add_dependencies(ha_columnstore marias3)
add_definitions(-DMYSQL_DYNAMIC_PLUGIN -DPLUGIN_COLUMNSTORE_VERSION="${PACKAGE_VERSION}")
target_link_libraries(ha_columnstore ${S3API_DEPS} ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${NETSNMP_LIBRARIES} ${SERVER_BUILD_DIR}/libservices/libmysqlservices.a threadpool)
target_link_libraries(
ha_columnstore
${S3API_DEPS}
${ENGINE_LDFLAGS}
${ENGINE_WRITE_LIBS}
${NETSNMP_LIBRARIES}
${SERVER_BUILD_DIR}/libservices/libmysqlservices.a
threadpool
)
install(TARGETS ha_columnstore DESTINATION ${MARIADB_PLUGINDIR} COMPONENT columnstore-engine)
install(
TARGETS ha_columnstore
DESTINATION ${MARIADB_PLUGINDIR}
COMPONENT columnstore-engine
)
# define this dummy target for standalone builds (ie, when mysql_add_plugin doesn't exist)
add_custom_target(columnstore DEPENDS ha_columnstore)
install(FILES columnstore.cnf DESTINATION ${MARIADB_MYCNFDIR} COMPONENT columnstore-engine)
endif ()
if (TARGET columnstore)
install(FILES syscatalog_mysql.sql
dumpcat_mysql.sql
calsetuserpriority.sql
calremoveuserpriority.sql
calshowprocesslist.sql
columnstore_info.sql
DESTINATION ${ENGINE_SUPPORTDIR} COMPONENT columnstore-engine)
install(PROGRAMS install_mcs_mysql.sh
DESTINATION ${ENGINE_SBINDIR} COMPONENT columnstore-engine)
install(
FILES columnstore.cnf
DESTINATION ${MARIADB_MYCNFDIR}
COMPONENT columnstore-engine
)
endif()
if(TARGET columnstore)
install(
FILES syscatalog_mysql.sql dumpcat_mysql.sql calsetuserpriority.sql calremoveuserpriority.sql
calshowprocesslist.sql columnstore_info.sql
DESTINATION ${ENGINE_SUPPORTDIR}
COMPONENT columnstore-engine
)
install(
PROGRAMS install_mcs_mysql.sh
DESTINATION ${ENGINE_SBINDIR}
COMPONENT columnstore-engine
)
endif()