Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
7acf3178
Commit
7acf3178
authored
May 26, 2019
by
Vladislav Vaintroub
Committed by
Sergei Krivonos
Nov 09, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new option NOT_EMBEDDED, for plugins
Means, plugin will not be available in embedded, even if compiled-in
parent
f7c6c02a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
8 deletions
+20
-8
CMakeLists.txt
CMakeLists.txt
+1
-1
cmake/plugin.cmake
cmake/plugin.cmake
+17
-5
libmysqld/CMakeLists.txt
libmysqld/CMakeLists.txt
+2
-2
No files found.
CMakeLists.txt
View file @
7acf3178
...
...
@@ -402,7 +402,7 @@ IF(WITH_UNIT_TESTS)
ENDIF
()
ENDIF
()
SET
(
MYSQLD_STATIC_PLUGIN_LIBS
""
CACHE INTERNAL
""
)
UNSET
(
MYSQLD_STATIC_PLUGIN_LIBS CACHE
)
INCLUDE
(
mariadb_connector_c
)
# this does ADD_SUBDIRECTORY(libmariadb)
...
...
cmake/plugin.cmake
View file @
7acf3178
...
...
@@ -25,12 +25,13 @@ INCLUDE(CMakeParseArguments)
# [MODULE_OUTPUT_NAME module_name]
# [STATIC_OUTPUT_NAME static_name]
# [RECOMPILE_FOR_EMBEDDED]
# [NOT_EMBEDDED]
# [LINK_LIBRARIES lib1...libN]
# [DEPENDS target1...targetN]
MACRO
(
MYSQL_ADD_PLUGIN
)
CMAKE_PARSE_ARGUMENTS
(
ARG
"STORAGE_ENGINE;STATIC_ONLY;MODULE_ONLY;MANDATORY;DEFAULT;DISABLED;RECOMPILE_FOR_EMBEDDED;CLIENT"
"STORAGE_ENGINE;STATIC_ONLY;MODULE_ONLY;MANDATORY;DEFAULT;DISABLED;
NOT_EMBEDDED;
RECOMPILE_FOR_EMBEDDED;CLIENT"
"MODULE_OUTPUT_NAME;STATIC_OUTPUT_NAME;COMPONENT;CONFIG"
"LINK_LIBRARIES;DEPENDS"
${
ARGN
}
...
...
@@ -140,7 +141,7 @@ MACRO(MYSQL_ADD_PLUGIN)
DTRACE_INSTRUMENT
(
${
target
}
)
ADD_DEPENDENCIES
(
${
target
}
GenError
${
ARG_DEPENDS
}
)
RESTRICT_SYMBOL_EXPORTS
(
${
target
}
)
IF
(
WITH_EMBEDDED_SERVER
)
IF
(
WITH_EMBEDDED_SERVER
AND
(
NOT ARG_NOT_EMBEDDED
)
)
# Embedded library should contain PIC code and be linkable
# to shared libraries (on systems that need PIC)
IF
(
ARG_RECOMPILE_FOR_EMBEDDED OR NOT _SKIP_PIC
)
...
...
@@ -165,19 +166,30 @@ MACRO(MYSQL_ADD_PLUGIN)
TARGET_LINK_LIBRARIES
(
${
target
}
${
ARG_LINK_LIBRARIES
}
)
ENDIF
()
SET
(
${
with_var
}
ON CACHE INTERNAL
"Link
${
plugin
}
statically to the server"
FORCE
)
# Update mysqld dependencies
SET
(
MYSQLD_STATIC_PLUGIN_LIBS
${
MYSQLD_STATIC_PLUGIN_LIBS
}
${
target
}
${
ARG_LINK_LIBRARIES
}
CACHE INTERNAL
""
FORCE
)
SET
(
${
with_var
}
ON CACHE INTERNAL
"Link
${
plugin
}
statically to the server"
FORCE
)
IF
(
WITH_EMBEDDED_SERVER
AND
(
NOT ARG_NOT_EMBEDDED
))
SET
(
EMBEDDED_PLUGIN_LIBS
${
EMBEDDED_PLUGIN_LIBS
}
${
target
}
${
ARG_LINK_LIBRARIES
}
CACHE INTERNAL
""
FORCE
)
ENDIF
()
IF
(
ARG_NOT_EMBEDDED
)
SET
(
builtin_entry
"#ifndef EMBEDDED_LIBRARY
\n
builtin_maria_
${
target
}
_plugin,
\n
#endif"
)
ELSE
()
SET
(
builtin_entry
" builtin_maria_
${
target
}
_plugin,"
)
ENDIF
()
IF
(
ARG_MANDATORY
)
SET
(
mysql_mandatory_plugins
"
${
mysql_mandatory_plugins
}
builtin_maria_
${
target
}
_plugin,
"
)
"
${
mysql_mandatory_plugins
}
${
builtin_entry
}
\n
"
)
SET
(
mysql_mandatory_plugins
${
mysql_mandatory_plugins
}
PARENT_SCOPE
)
ELSE
()
SET
(
mysql_optional_plugins
"
${
mysql_optional_plugins
}
builtin_maria_
${
target
}
_plugin,
"
)
"
${
mysql_optional_plugins
}
${
builtin_entry
}
\n
"
)
SET
(
mysql_optional_plugins
${
mysql_optional_plugins
}
PARENT_SCOPE
)
ENDIF
()
ELSEIF
(
PLUGIN_
${
plugin
}
MATCHES
"(DYNAMIC|AUTO|YES)"
...
...
libmysqld/CMakeLists.txt
View file @
7acf3178
...
...
@@ -55,7 +55,7 @@ SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
../sql/item_subselect.cc ../sql/item_sum.cc ../sql/item_timefunc.cc
../sql/item_xmlfunc.cc ../sql/item_jsonfunc.cc
../sql/key.cc ../sql/lock.cc ../sql/log.cc
../sql/log_event.cc ../sql/mf_iocache.cc ../sql/my_decimal.cc
../sql/log_event.cc ../sql/mf_iocache.cc ../sql/my_decimal.cc
../sql/net_serv.cc ../sql/opt_range.cc ../sql/opt_sum.cc
../sql/parse_file.cc ../sql/procedure.cc ../sql/protocol.cc
../sql/records.cc ../sql/repl_failsafe.cc ../sql/rpl_filter.cc
...
...
@@ -154,7 +154,7 @@ SET(LIBS
dbug strings mysys mysys_ssl pcre vio
${
ZLIB_LIBRARY
}
${
SSL_LIBRARIES
}
${
LIBWRAP
}
${
LIBCRYPT
}
${
CMAKE_DL_LIBS
}
${
MYSQLD_STATIC
_PLUGIN_LIBS
}
${
EMBEDDED
_PLUGIN_LIBS
}
sql_embedded
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment