diff options
Diffstat (limited to 'storage')
-rw-r--r-- | storage/Makefile.am | 1 | ||||
-rw-r--r-- | storage/archive/CMakeLists.txt | 10 | ||||
-rw-r--r-- | storage/blackhole/CMakeLists.txt | 5 | ||||
-rw-r--r-- | storage/csv/CMakeLists.txt | 3 | ||||
-rw-r--r-- | storage/example/CMakeLists.txt | 2 | ||||
-rw-r--r-- | storage/federated/CMakeLists.txt | 8 | ||||
-rwxr-xr-x | storage/heap/CMakeLists.txt | 3 | ||||
-rw-r--r-- | storage/ibmdb2i/CMakeLists.txt | 27 | ||||
-rw-r--r-- | storage/innobase/CMakeLists.txt | 167 | ||||
-rw-r--r-- | storage/innobase/include/page0page.ic | 2 | ||||
-rwxr-xr-x | storage/myisam/CMakeLists.txt | 50 | ||||
-rwxr-xr-x | storage/myisammrg/CMakeLists.txt | 3 | ||||
-rw-r--r-- | storage/mysql_storage_engine.cmake | 44 |
13 files changed, 217 insertions, 108 deletions
diff --git a/storage/Makefile.am b/storage/Makefile.am index 8aa1e4f7dc6..5b4e32374ae 100644 --- a/storage/Makefile.am +++ b/storage/Makefile.am @@ -18,7 +18,6 @@ AUTOMAKE_OPTIONS = foreign # These are built from source in the Docs directory -EXTRA_DIST = mysql_storage_engine.cmake SUBDIRS = @mysql_se_dirs@ DIST_SUBDIRS = @mysql_se_distdirs@ diff --git a/storage/archive/CMakeLists.txt b/storage/archive/CMakeLists.txt index ce4d92d3f99..458f21bfb6c 100644 --- a/storage/archive/CMakeLists.txt +++ b/storage/archive/CMakeLists.txt @@ -13,6 +13,14 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -INCLUDE("${PROJECT_SOURCE_DIR}/storage/mysql_storage_engine.cmake") +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() + + diff --git a/storage/blackhole/CMakeLists.txt b/storage/blackhole/CMakeLists.txt index bed282ef21d..ec28208c311 100644 --- a/storage/blackhole/CMakeLists.txt +++ b/storage/blackhole/CMakeLists.txt @@ -13,7 +13,8 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -INCLUDE("${PROJECT_SOURCE_DIR}/storage/mysql_storage_engine.cmake") -SET(BLACKHOLE_SOURCES ha_blackhole.cc ha_blackhole.h) +SET(BLACKHOLE_PLUGIN_STATIC "blackhole") +SET(BLACKHOLE_PLUGIN_DYNAMIC "ha_blackhole") +SET(BLACKHOLE_SOURCES ha_blackhole.cc ha_blackhole.h) MYSQL_STORAGE_ENGINE(BLACKHOLE) diff --git a/storage/csv/CMakeLists.txt b/storage/csv/CMakeLists.txt index 37760588897..b9d31fc372f 100644 --- a/storage/csv/CMakeLists.txt +++ b/storage/csv/CMakeLists.txt @@ -13,7 +13,8 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +SET(CSV_PLUGIN_STATIC "csv") +SET(CSV_PLUGIN_MANDATORY TRUE) -INCLUDE("${PROJECT_SOURCE_DIR}/storage/mysql_storage_engine.cmake") 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 diff --git a/storage/example/CMakeLists.txt b/storage/example/CMakeLists.txt index f0b1343ab9c..47722dfd53b 100644 --- a/storage/example/CMakeLists.txt +++ b/storage/example/CMakeLists.txt @@ -13,6 +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 -INCLUDE("${PROJECT_SOURCE_DIR}/storage/mysql_storage_engine.cmake") +SET(EXAMPLE_PLUGIN_DYNAMIC "ha_example") SET(EXAMPLE_SOURCES ha_example.cc) MYSQL_STORAGE_ENGINE(EXAMPLE) diff --git a/storage/federated/CMakeLists.txt b/storage/federated/CMakeLists.txt index fa54d36481a..f47c7240682 100644 --- a/storage/federated/CMakeLists.txt +++ b/storage/federated/CMakeLists.txt @@ -13,6 +13,12 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -INCLUDE("${PROJECT_SOURCE_DIR}/storage/mysql_storage_engine.cmake") +SET(FEDERATED_PLUGIN_STATIC "federated") +SET(FEDERATED_PLUGIN_DYNAMIC "ha_federated") SET(FEDERATED_SOURCES ha_federated.cc) +IF(NOT WITH_FEDERATED AND NOT WITH_FEDERATED_STORAGE_ENGINE) + # Bug#45488- federated uses symbols that are not used anywhere in + # mysqld and are optimized away by the linker. + SET(FEDERATED_SOURCES ${FEDERATED_SOURCES} ${CMAKE_SOURCE_DIR}/mysys/string.c) +ENDIF() MYSQL_STORAGE_ENGINE(FEDERATED) diff --git a/storage/heap/CMakeLists.txt b/storage/heap/CMakeLists.txt index 4a0fa22c8f1..1e88ecd503f 100755 --- a/storage/heap/CMakeLists.txt +++ b/storage/heap/CMakeLists.txt @@ -13,8 +13,9 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +SET(HEAP_PLUGIN_STATIC "heap") +SET(HEAP_PLUGIN_MANDATORY TRUE) -INCLUDE("${PROJECT_SOURCE_DIR}/storage/mysql_storage_engine.cmake") SET(HEAP_SOURCES _check.c _rectest.c hp_block.c hp_clear.c hp_close.c hp_create.c ha_heap.cc hp_delete.c hp_extra.c hp_hash.c hp_info.c hp_open.c hp_panic.c diff --git a/storage/ibmdb2i/CMakeLists.txt b/storage/ibmdb2i/CMakeLists.txt index 11cc4300569..76ef3b2662d 100644 --- a/storage/ibmdb2i/CMakeLists.txt +++ b/storage/ibmdb2i/CMakeLists.txt @@ -13,13 +13,28 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") -SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") +SET(IBMDB2I_PLUGIN_DYNAMIC "ha_ibmdb2i") +CHECK_INCLUDE_FILES(qlgusr.h HAVE_PASE_ENVIRONMENT) +IF(HAVE_PASE_ENVIRONMENT) -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/sql - ${CMAKE_SOURCE_DIR}/regex - ${CMAKE_SOURCE_DIR}/extra/yassl/include) -ADD_LIBRARY(ibmdb2i ha_ibmdb2i.cc db2i_ileBridge.cc db2i_conversion.cc +INCLUDE_DIRECTORIES( + ${CMAKE_SOURCE_DIR}/include + ${CMAKE_BINARY_DIR}/include + ${CMAKE_SOURCE_DIR}/regex + ${CMAKE_SOURCE_DIR}/sql + ${CMAKE_CURRENT_SOURCE_DIR} + /afs/rchland.ibm.com/lande/shadow/dev2000/osxpf/v5r4m0f.xpf/cur/cmvc/base.pgm/my.xpf/apis + /afs/rchland.ibm.com/lande/shadow/dev2000/osxpf/v5r4m0.xpf/bld/cmvc/base.pgm/lg.xpf + /afs/rchland.ibm.com/lande/shadow/dev2000/osxpf/v5r4m0.xpf/bld/cmvc/base.pgm/tq.xpf +) + + +SET (IBMDB2I_SOURCES ha_ibmdb2i.cc db2i_ileBridge.cc db2i_conversion.cc db2i_blobCollection.cc db2i_file.cc db2i_charsetSupport.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) + +ENDIF(HAVE_PASE_ENVIRONMENT) diff --git a/storage/innobase/CMakeLists.txt b/storage/innobase/CMakeLists.txt index d67b518642c..c8ec56ee5c9 100644 --- a/storage/innobase/CMakeLists.txt +++ b/storage/innobase/CMakeLists.txt @@ -15,40 +15,127 @@ # This is the CMakeLists for InnoDB Plugin +INCLUDE(CheckFunctionExists) +INCLUDE(CheckCSourceCompiles) +INCLUDE(CheckCSourceRuns) -# TODO: remove the two FLAGS_DEBUG settings when merging into -# 6.0-based trees, like is already the case for other engines in -# those trees. -SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") -SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") +# OS tests +IF(UNIX) + IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") + ADD_DEFINITIONS("-DUNIV_LINUX") + ELSEIF(CMAKE_SYSTEM_NAME MATCHES "HP*") + ADD_DEFINITIONS("-DUNIV_HPUX -DUNIV_MUST_NOT_INLINE") + ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "AIX") + ADD_DEFINITIONS("-DUNIV_AIX -DUNIX_MUST_NOT_INLINE") + ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "SunOS") + ADD_DEFINITIONS("-DUNIV_SOLARIS") + ELSE() + ADD_DEFINITIONS("-DUNIV_MUST_NOT_INLINE") + ENDIF() +ENDIF() -# Starting at 5.1.38, MySQL CMake files are simplified. But the plugin -# CMakeLists.txt still needs to work with previous versions of MySQL. -IF (MYSQL_VERSION_ID GREATER "50137") - INCLUDE("${PROJECT_SOURCE_DIR}/storage/mysql_storage_engine.cmake") -ENDIF (MYSQL_VERSION_ID GREATER "50137") +# Solaris atomics +IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS") + CHECK_FUNCTION_EXISTS(atomic_cas_ulong HAVE_ATOMIC_CAS_ULONG) + CHECK_FUNCTION_EXISTS(atomic_cas_32 HAVE_ATOMIC_CAS_32) + CHECK_FUNCTION_EXISTS(atomic_cas_64 HAVE_ATOMIC_CAS_64) + 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) + ENDIF() +ENDIF() + +IF(HAVE_GCC_ATOMIC_BUILTINS) + CHECK_C_SOURCE_COMPILES(" + #include <pthread.h> + #include <string.h> + int main() + { + pthread_t x1; + pthread_t x2; + pthread_t x3; + __sync_bool_compare_and_swap(&x1, x2, x3); + return 0; + }" HAVE_ATOMIC_PTHREAD_T_GCC + ) +ENDIF() + +IF(NOT HAVE_ATOMIC_PTHREAD_T_GCC AND HAVE_SOLARIS_ATOMICS) + CHECK_C_SOURCE_COMPILES(" + #include <pthread.h> + int main() + { + pthread_t x = 0; + return(0); + }" HAVE_ATOMIC_PTHREAD_T_SOLARIS + ) + IF(HAVE_ATOMIC_PTHREAD_T_SOLARIS) + SET(CMAKE_EXTRA_INCLUDE_FILES pthread.h) + CHECK_TYPE_SIZE(pthread_t SIZEOF_PTHREAD_T) + SET(CMAKE_EXTRA_INCLUDE_FILES) + ENDIF() +ENDIF() + +IF(NOT CMAKE_CROSSCOMPILING) + STRING(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} processor) + IF(NOT WIN32 AND processor MATCHES "86" OR processor MATCHES "amd64" + OR processor MATCHES "x64") + # Check for x86 PAUSE instruction + # We have to actually try running the test program, because of a bug + # in Solaris on x86_64, where it wrongly reports that PAUSE is not + # supported when trying to run an application. See + # 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) + ENDIF() +ENDIF() + +IF(HAVE_ATOMIC_PTHREAD_T_SOLARIS OR HAVE_ATOMIC_PTHREAD_T_GCC) + ADD_DEFINITIONS(-DHAVE_ATOMIC_PTHREAD_T=1) +ENDIF() + +IF(HAVE_SOLARIS_ATOMICS) + ADD_DEFINITIONS(-DHAVE_SOLARIS_ATOMICS=1) +ENDIF() + +IF(IB_HAVE_PAUSE_INSTRUCTIONS) + ADD_DEFINITIONS(-DIB_HAVE_PAUSE_INSTRUCTIONS=1) +ENDIF() + +IF(SIZEOF_PTHREAD_T) + ADD_DEFINITIONS(-DSIZEOF_PTHREAD_T=${SIZEOF_PTHREAD_T}) +ENDIF() + +IF(MSVC) + ADD_DEFINITIONS(-DHAVE_WINDOWS_ATOMICS -DIB_HAVE_PAUSE_INSTRUCTION) +ENDIF() -IF (CMAKE_SIZEOF_VOID_P MATCHES 8) - SET(WIN64 TRUE) -ENDIF (CMAKE_SIZEOF_VOID_P MATCHES 8) # Include directories under innobase INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/storage/innobase/include ${CMAKE_SOURCE_DIR}/storage/innobase/handler) -# Include directories under mysql -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include - ${CMAKE_SOURCE_DIR}/sql - ${CMAKE_SOURCE_DIR}/regex - ${CMAKE_SOURCE_DIR}/zlib - ${CMAKE_SOURCE_DIR}/extra/yassl/include) +# Sun Studio bug with -xO2 +IF(CMAKE_C_COMPILER_ID MATCHES "SunPro" + AND CMAKE_C_FLAGS_RELEASE MATCHES "O2" + AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug") + # Sun Studio 12 crashes with -xO2 flag, but not with higher optimization + # -xO3 + SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/rem/rem0rec.c + PROPERTIES COMPILE_FLAGS -xO3) +ENDIF() # Removing compiler optimizations for innodb/mem/* files on 64-bit Windows # due to 64-bit compiler error, See MySQL Bug #19424, #36366, #34297 -IF (MSVC AND $(WIN64)) +IF (MSVC AND CMAKE_SIZEOF_VOIDP EQUAL 8) SET_SOURCE_FILES_PROPERTIES(mem/mem0mem.c mem/mem0pool.c PROPERTIES COMPILE_FLAGS -Od) -ENDIF (MSVC AND $(WIN64)) +ENDIF() SET(INNOBASE_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c buf/buf0buddy.c buf/buf0buf.c buf/buf0flu.c buf/buf0lru.c buf/buf0rea.c @@ -83,20 +170,42 @@ SET(INNOBASE_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c usr/usr0sess.c ut/ut0byte.c ut/ut0dbg.c ut/ut0mem.c ut/ut0rnd.c ut/ut0ut.c ut/ut0vec.c ut/ut0list.c ut/ut0wqueue.c) -ADD_DEFINITIONS(-DHAVE_WINDOWS_ATOMICS -DIB_HAVE_PAUSE_INSTRUCTION) -IF (MYSQL_VERSION_ID GREATER "50137") +IF(WITH_INNODB) + # Legacy option + 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) + # Old plugin support on Windows only, + # use tricks to force ha_innodb.dll name for DLL + INCLUDE(${SOURCE_DIR}/storage/mysql_storage_engine.cmake) MYSQL_STORAGE_ENGINE(INNOBASE) - # Use ha_innodb for plugin name, if plugin is built GET_TARGET_PROPERTY(LIB_LOCATION ha_innobase LOCATION) IF(LIB_LOCATION) SET_TARGET_PROPERTIES(ha_innobase PROPERTIES OUTPUT_NAME ha_innodb) - ENDIF(LIB_LOCATION) -ELSE (MYSQL_VERSION_ID GREATER "50137") + ENDIF() +ELSEIF (MYSQL_VERSION_ID LESS "50137") + # Windows only, no plugin support IF (NOT SOURCE_SUBLIBS) - ADD_DEFINITIONS(-D_WIN32 -DMYSQL_SERVER) + ADD_DEFINITIONS(-DMYSQL_SERVER) ADD_LIBRARY(innobase STATIC ${INNOBASE_SOURCES}) # Require mysqld_error.h, which is built as part of the GenError ADD_DEPENDENCIES(innobase GenError) - ENDIF (NOT SOURCE_SUBLIBS) -ENDIF (MYSQL_VERSION_ID GREATER "50137") + ENDIF() +ELSE() + # New plugin support, cross-platform , name for shared library + # is given in INNOBASE_PLUGIN_STATIC and INNOBASE_PLUGIN_DYNAMIC + MYSQL_STORAGE_ENGINE(INNOBASE) +ENDIF() diff --git a/storage/innobase/include/page0page.ic b/storage/innobase/include/page0page.ic index 318ec1cc1f2..8f794410f20 100644 --- a/storage/innobase/include/page0page.ic +++ b/storage/innobase/include/page0page.ic @@ -907,7 +907,7 @@ page_get_data_size( /************************************************************//** Allocates a block of memory from the free list of an index page. */ -UNIV_INTERN +UNIV_INLINE void page_mem_alloc_free( /*================*/ diff --git a/storage/myisam/CMakeLists.txt b/storage/myisam/CMakeLists.txt index 829d89a798a..080448eb3f6 100755 --- a/storage/myisam/CMakeLists.txt +++ b/storage/myisam/CMakeLists.txt @@ -12,9 +12,9 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -INCLUDE("${PROJECT_SOURCE_DIR}/storage/mysql_storage_engine.cmake") -INCLUDE("${PROJECT_SOURCE_DIR}/win/mysql_manifest.cmake") +SET(MYISAM_PLUGIN_STATIC "myisam") +SET(MYISAM_PLUGIN_MANDATORY TRUE) SET(MYISAM_SOURCES ft_boolean_search.c ft_nlq_search.c ft_parser.c ft_static.c ft_stem.c ha_myisam.cc @@ -30,26 +30,38 @@ SET(MYISAM_SOURCES ft_boolean_search.c ft_nlq_search.c ft_parser.c ft_static.c MYSQL_STORAGE_ENGINE(MYISAM) -IF(NOT SOURCE_SUBLIBS) - ADD_EXECUTABLE(myisam_ftdump myisam_ftdump.c) - TARGET_LINK_LIBRARIES(myisam_ftdump myisam mysys dbug strings zlib) +ADD_EXECUTABLE(myisam_ftdump myisam_ftdump.c) +TARGET_LINK_LIBRARIES(myisam_ftdump myisam mysys) - ADD_EXECUTABLE(myisamchk myisamchk.c) - TARGET_LINK_LIBRARIES(myisamchk myisam mysys dbug strings zlib) +ADD_EXECUTABLE(myisamchk myisamchk.c) +TARGET_LINK_LIBRARIES(myisamchk myisam mysys) - ADD_EXECUTABLE(myisamlog myisamlog.c) - TARGET_LINK_LIBRARIES(myisamlog myisam mysys dbug strings zlib) +ADD_EXECUTABLE(myisamlog myisamlog.c) +TARGET_LINK_LIBRARIES(myisamlog myisam mysys) - ADD_EXECUTABLE(myisampack myisampack.c) - TARGET_LINK_LIBRARIES(myisampack myisam mysys dbug strings zlib) +ADD_EXECUTABLE(myisampack myisampack.c) - SET_TARGET_PROPERTIES(myisamchk myisampack PROPERTIES LINK_FLAGS "setargv.obj") +TARGET_LINK_LIBRARIES(myisampack myisam mysys) + +IF(WITH_UNIT_TESTS AND FALSE) + ADD_EXECUTABLE(mi_test1 mi_test1.c) + TARGET_LINK_LIBRARIES(mi_test1 myisam mysys) + + ADD_EXECUTABLE(mi_test2 mi_test2.c) + TARGET_LINK_LIBRARIES(mi_test2 myisam mysys) - IF(EMBED_MANIFESTS) - MYSQL_EMBED_MANIFEST("myisam_ftdump" "asInvoker") - MYSQL_EMBED_MANIFEST("myisamchk" "asInvoker") - MYSQL_EMBED_MANIFEST("myisamlog" "asInvoker") - MYSQL_EMBED_MANIFEST("myisampack" "asInvoker") - ENDIF(EMBED_MANIFESTS) + ADD_EXECUTABLE(mi_test3 mi_test3.c) + TARGET_LINK_LIBRARIES(mi_test3 myisam mysys) + + ADD_EXECUTABLE(sp_test sp_test.c) + TARGET_LINK_LIBRARIES(sp_test myisam mysys) + + ADD_EXECUTABLE(rt_test rt_test.c) + TARGET_LINK_LIBRARIES(rt_test myisam mysys) +ENDIF() + +IF (MSVC) + SET_TARGET_PROPERTIES(myisamchk myisampack PROPERTIES LINK_FLAGS "setargv.obj") +ENDIF() -ENDIF(NOT SOURCE_SUBLIBS) +INSTALL(TARGETS myisamchk myisamlog myisampack myisam_ftdump DESTINATION bin) diff --git a/storage/myisammrg/CMakeLists.txt b/storage/myisammrg/CMakeLists.txt index c545d04a780..206848b1715 100755 --- a/storage/myisammrg/CMakeLists.txt +++ b/storage/myisammrg/CMakeLists.txt @@ -13,7 +13,8 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -INCLUDE("${PROJECT_SOURCE_DIR}/storage/mysql_storage_engine.cmake") +SET(MYISAMMRG_PLUGIN_STATIC "myisammrg") +SET(MYISAMMRG_PLUGIN_MANDATORY 1) SET(MYISAMMRG_SOURCES myrg_close.c myrg_create.c myrg_delete.c myrg_extra.c myrg_info.c ha_myisammrg.cc diff --git a/storage/mysql_storage_engine.cmake b/storage/mysql_storage_engine.cmake deleted file mode 100644 index b920f16452b..00000000000 --- a/storage/mysql_storage_engine.cmake +++ /dev/null @@ -1,44 +0,0 @@ -# MYSQL_STORAGE_ENGINE Macro creates a project to build storage engine -# library. -# -# Parameters: -# engine - storage engine name. -# variable ENGINE_BUILD_TYPE should be set to "STATIC" or "DYNAMIC" -# Remarks: -# ${engine}_SOURCES variable containing source files to produce the library must set before -# calling this macro -# ${engine}_LIBS variable containing extra libraries to link with may be set - - -MACRO(MYSQL_STORAGE_ENGINE engine) -IF(NOT SOURCE_SUBLIBS) - # Add common include directories - INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib - ${CMAKE_SOURCE_DIR}/sql - ${CMAKE_SOURCE_DIR}/regex - ${CMAKE_SOURCE_DIR}/extra/yassl/include) - STRING(TOUPPER ${engine} engine) - STRING(TOLOWER ${engine} libname) - IF(${ENGINE_BUILD_TYPE} STREQUAL "STATIC") - ADD_DEFINITIONS(-DWITH_${engine}_STORAGE_ENGINE -DMYSQL_SERVER) - #Create static library. The name of the library is <storage_engine>.lib - ADD_LIBRARY(${libname} ${${engine}_SOURCES}) - ADD_DEPENDENCIES(${libname} GenError) - IF(${engine}_LIBS) - TARGET_LINK_LIBRARIES(${libname} ${${engine}_LIBS}) - ENDIF(${engine}_LIBS) - MESSAGE("build ${engine} as static library") - ELSEIF(${ENGINE_BUILD_TYPE} STREQUAL "DYNAMIC") - ADD_DEFINITIONS(-DMYSQL_DYNAMIC_PLUGIN) - #Create a DLL.The name of the dll is ha_<storage_engine>.dll - #The dll is linked to the mysqld executable - SET(dyn_libname ha_${libname}) - ADD_LIBRARY(${dyn_libname} SHARED ${${engine}_SOURCES}) - TARGET_LINK_LIBRARIES (${dyn_libname} mysqlservices mysqld) - IF(${engine}_LIBS) - TARGET_LINK_LIBRARIES(${dyn_libname} ${${engine}_LIBS}) - ENDIF(${engine}_LIBS) - MESSAGE("build ${engine} as DLL") - ENDIF(${ENGINE_BUILD_TYPE} STREQUAL "STATIC") -ENDIF(NOT SOURCE_SUBLIBS) -ENDMACRO(MYSQL_STORAGE_ENGINE) |