summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorVladislav Vaintroub <vvaintroub@mysql.com>2009-12-01 12:00:50 +0100
committerVladislav Vaintroub <vvaintroub@mysql.com>2009-12-01 12:00:50 +0100
commit5dfa313eb7c9c1663b0e79b6ff4bca1f9ac77e51 (patch)
treed89705a5ecb9443a34d6ac498e2557565ff952b2 /storage
parentf458a4c963284fe9b9fa6af3d10dd0144813c8f4 (diff)
downloadmariadb-git-5dfa313eb7c9c1663b0e79b6ff4bca1f9ac77e51.tar.gz
- Introduce MYSQL_ADD_PLUGIN that replaces MYSQL_STORAGE_ENGINE
- Fix semisync library prefix (remove lib on Unixes) - restrict exported symbols from zlib and yassl (fvisibility=hidden)
Diffstat (limited to 'storage')
-rw-r--r--storage/archive/CMakeLists.txt9
-rw-r--r--storage/blackhole/CMakeLists.txt4
-rw-r--r--storage/csv/CMakeLists.txt2
-rw-r--r--storage/example/CMakeLists.txt2
-rw-r--r--storage/federated/CMakeLists.txt2
-rwxr-xr-xstorage/heap/CMakeLists.txt3
-rw-r--r--storage/ibmdb2i/CMakeLists.txt4
-rw-r--r--storage/innobase/CMakeLists.txt20
-rwxr-xr-xstorage/myisam/CMakeLists.txt5
-rwxr-xr-xstorage/myisammrg/CMakeLists.txt2
10 files changed, 21 insertions, 32 deletions
diff --git a/storage/archive/CMakeLists.txt b/storage/archive/CMakeLists.txt
index 458f21bfb6c..d47fd254b0e 100644
--- a/storage/archive/CMakeLists.txt
+++ b/storage/archive/CMakeLists.txt
@@ -13,14 +13,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-SET(ARCHIVE_PLUGIN_STATIC "archive")
-SET(ARCHIVE_PLUGIN_DYNAMIC "ha_archive")
SET(ARCHIVE_SOURCES azio.c ha_archive.cc ha_archive.h)
-MYSQL_STORAGE_ENGINE(ARCHIVE)
-IF(NOT WITH_ARCHIVE_STORAGE_ENGINE AND NOT WITHOUT_ARCHIVE_STORAGE_ENGINE
- AND NOT WITH_ZLIB STREQUAL "bundled")
- TARGET_LINK_LIBRARIES(archive ${ZLIB_LIBRARY})
-ENDIF()
-
+MYSQL_ADD_PLUGIN(archive ${ARCHIVE_SOURCES} STORAGE_ENGINE LINK_LIBRARIES ${ZLIB_LIBRARY})
diff --git a/storage/blackhole/CMakeLists.txt b/storage/blackhole/CMakeLists.txt
index ec28208c311..6b6e417c091 100644
--- a/storage/blackhole/CMakeLists.txt
+++ b/storage/blackhole/CMakeLists.txt
@@ -13,8 +13,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-SET(BLACKHOLE_PLUGIN_STATIC "blackhole")
-SET(BLACKHOLE_PLUGIN_DYNAMIC "ha_blackhole")
SET(BLACKHOLE_SOURCES ha_blackhole.cc ha_blackhole.h)
-MYSQL_STORAGE_ENGINE(BLACKHOLE)
+MYSQL_ADD_PLUGIN(BLACKHOLE ${BLACKHOLE_SOURCES} STORAGE_ENGINE)
diff --git a/storage/csv/CMakeLists.txt b/storage/csv/CMakeLists.txt
index b9d31fc372f..73d1794a369 100644
--- a/storage/csv/CMakeLists.txt
+++ b/storage/csv/CMakeLists.txt
@@ -17,4 +17,4 @@ SET(CSV_PLUGIN_STATIC "csv")
SET(CSV_PLUGIN_MANDATORY TRUE)
SET(CSV_SOURCES ha_tina.cc ha_tina.h transparent_file.cc transparent_file.h)
-MYSQL_STORAGE_ENGINE(CSV) \ No newline at end of file
+MYSQL_ADD_PLUGIN(csv ${CSV_SOURCES} STORAGE_ENGINE MANDATORY)
diff --git a/storage/example/CMakeLists.txt b/storage/example/CMakeLists.txt
index 47722dfd53b..109f4bfa844 100644
--- a/storage/example/CMakeLists.txt
+++ b/storage/example/CMakeLists.txt
@@ -15,4 +15,4 @@
SET(EXAMPLE_PLUGIN_DYNAMIC "ha_example")
SET(EXAMPLE_SOURCES ha_example.cc)
-MYSQL_STORAGE_ENGINE(EXAMPLE)
+MYSQL_ADD_PLUGIN(example ${EXAMPLE_SOURCES} STORAGE_ENGINE)
diff --git a/storage/federated/CMakeLists.txt b/storage/federated/CMakeLists.txt
index f47c7240682..ac55543f276 100644
--- a/storage/federated/CMakeLists.txt
+++ b/storage/federated/CMakeLists.txt
@@ -21,4 +21,4 @@ IF(NOT WITH_FEDERATED AND NOT WITH_FEDERATED_STORAGE_ENGINE)
# mysqld and are optimized away by the linker.
SET(FEDERATED_SOURCES ${FEDERATED_SOURCES} ${CMAKE_SOURCE_DIR}/mysys/string.c)
ENDIF()
-MYSQL_STORAGE_ENGINE(FEDERATED)
+MYSQL_ADD_PLUGIN(federated ${FEDERATED_SOURCES} STORAGE_ENGINE)
diff --git a/storage/heap/CMakeLists.txt b/storage/heap/CMakeLists.txt
index 1e88ecd503f..32359759abc 100755
--- a/storage/heap/CMakeLists.txt
+++ b/storage/heap/CMakeLists.txt
@@ -21,4 +21,5 @@ SET(HEAP_SOURCES _check.c _rectest.c hp_block.c hp_clear.c hp_close.c hp_create
hp_delete.c hp_extra.c hp_hash.c hp_info.c hp_open.c hp_panic.c
hp_rename.c hp_rfirst.c hp_rkey.c hp_rlast.c hp_rnext.c hp_rprev.c
hp_rrnd.c hp_rsame.c hp_scan.c hp_static.c hp_update.c hp_write.c)
-MYSQL_STORAGE_ENGINE(HEAP)
+
+MYSQL_ADD_PLUGIN(heap ${HEAP_SOURCES} STORAGE_ENGINE MANDATORY RECOMPILE_FOR_EMBEDDED)
diff --git a/storage/ibmdb2i/CMakeLists.txt b/storage/ibmdb2i/CMakeLists.txt
index 76ef3b2662d..b1517f53f7f 100644
--- a/storage/ibmdb2i/CMakeLists.txt
+++ b/storage/ibmdb2i/CMakeLists.txt
@@ -34,7 +34,7 @@ SET (IBMDB2I_SOURCES ha_ibmdb2i.cc db2i_ileBridge.cc db2i_conversion.cc
db2i_collationSupport.cc db2i_errors.cc db2i_constraints.cc
db2i_rir.cc db2i_sqlStatementStream.cc db2i_ioBuffers.cc db2i_myconv.cc)
-SET(IBMDB2I_LIBS iconv)
-MYSQL_STORAGE_ENGINE(IBMDB2I)
+
+MYSQL_ADD_PLUGIN(ibmdb2i ${IBMDB2I_SOURCES} STORAGE_ENGINE LINK_LIBRARIES iconv)
ENDIF(HAVE_PASE_ENVIRONMENT)
diff --git a/storage/innobase/CMakeLists.txt b/storage/innobase/CMakeLists.txt
index c8ec56ee5c9..e5ecc98dc3a 100644
--- a/storage/innobase/CMakeLists.txt
+++ b/storage/innobase/CMakeLists.txt
@@ -42,7 +42,8 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
CHECK_FUNCTION_EXISTS(atomic_add_long HAVE_ATOMIC_ADD_LONG)
IF(HAVE_ATOMIC_CAS_ULONG AND HAVE_ATOMIC_CAS_32 AND
HAVE_ATOMIC_CAS_64 AND HAVE_ATOMIC_ADD_LONG)
- SET(HAVE_SOLARIS_ATOMICS 1)
+
+ SET(HAVE_SOLARIS_ATOMICS 1)
ENDIF()
ENDIF()
@@ -67,7 +68,7 @@ IF(NOT HAVE_ATOMIC_PTHREAD_T_GCC AND HAVE_SOLARIS_ATOMICS)
int main()
{
pthread_t x = 0;
- return(0);
+ return(0);
}" HAVE_ATOMIC_PTHREAD_T_SOLARIS
)
IF(HAVE_ATOMIC_PTHREAD_T_SOLARIS)
@@ -88,7 +89,7 @@ IF(NOT CMAKE_CROSSCOMPILING)
# http://bugs.opensolaris.org/bugdatabase/printableBug.do?bug_id=6478684
CHECK_C_SOURCE_RUNS("
int main()
- {
+ {
__asm__ __volatile__ (\"pause\");
return 0;
}" IB_HAVE_PAUSE_INSTRUCTION)
@@ -176,15 +177,6 @@ IF(WITH_INNODB)
SET(WITH_INNOBASE_STORAGE_ENGINE TRUE)
ENDIF()
-SET(INNOBASE_PLUGIN_STATIC "innobase")
-SET(INNOBASE_PLUGIN_DYNAMIC "ha_innodb")
-
-# Innobase depends on zlib. If server links with system
-# zlib shared library, and innobase builds as shared library,
-# innobase need to link with it too, to avoid unresolved symbols.
-IF(ZLIB_FOUND AND NOT WITH_ZLIB STREQUAL "bundled")
- SET(INNOBASE_LIBS ${ZLIB_LIBRARY})
-ENDIF()
#The plugin's CMakeLists.txt still needs to work with previous versions of MySQL.
IF(EXISTS ${SOURCE_DIR}/storage/mysql_storage_engine.cmake)
@@ -207,5 +199,7 @@ ELSEIF (MYSQL_VERSION_ID LESS "50137")
ELSE()
# New plugin support, cross-platform , name for shared library
# is given in INNOBASE_PLUGIN_STATIC and INNOBASE_PLUGIN_DYNAMIC
- MYSQL_STORAGE_ENGINE(INNOBASE)
+ MYSQL_ADD_PLUGIN(INNOBASE ${INNOBASE_SOURCES} STORAGE_ENGINE
+ MODULE_OUTPUT_NAME ha_innodb
+ LINK_LIBRARIES ${ZLIB_LIBRARY})
ENDIF()
diff --git a/storage/myisam/CMakeLists.txt b/storage/myisam/CMakeLists.txt
index 080448eb3f6..35b7629c597 100755
--- a/storage/myisam/CMakeLists.txt
+++ b/storage/myisam/CMakeLists.txt
@@ -28,7 +28,10 @@ SET(MYISAM_SOURCES ft_boolean_search.c ft_nlq_search.c ft_parser.c ft_static.c
mi_unique.c mi_update.c mi_write.c rt_index.c rt_key.c rt_mbr.c
rt_split.c sort.c sp_key.c ft_eval.h myisamdef.h rt_index.h mi_rkey.c)
-MYSQL_STORAGE_ENGINE(MYISAM)
+MYSQL_ADD_PLUGIN(myisam ${MYISAM_SOURCES}
+ STORAGE_ENGINE
+ MANDATORY
+ RECOMPILE_FOR_EMBEDDED)
ADD_EXECUTABLE(myisam_ftdump myisam_ftdump.c)
TARGET_LINK_LIBRARIES(myisam_ftdump myisam mysys)
diff --git a/storage/myisammrg/CMakeLists.txt b/storage/myisammrg/CMakeLists.txt
index 206848b1715..59bc5ce4fc1 100755
--- a/storage/myisammrg/CMakeLists.txt
+++ b/storage/myisammrg/CMakeLists.txt
@@ -23,4 +23,4 @@ SET(MYISAMMRG_SOURCES myrg_close.c myrg_create.c myrg_delete.c myrg_extra.c myr
myrg_rprev.c myrg_rrnd.c myrg_rsame.c myrg_static.c myrg_update.c
myrg_write.c myrg_records.c)
-MYSQL_STORAGE_ENGINE(MYISAMMRG)
+MYSQL_ADD_PLUGIN(MYISAMMRG ${MYISAMMRG_SOURCES} STORAGE_ENGINE MANDATORY RECOMPILE_FOR_EMBEDDED)