MDEV-672 : storage/maria and storage/perfschema do not appear to honor WITH_UNIT_TESTS
Disable compiling unit tests if WITH_UNIT_TEST is FALSE. Also, fix CMake code to allow compilation WITHOUT_ARIA_STORAGE_ENGINE
This commit is contained in:
parent
8d2c12a924
commit
bc5232a65d
@ -21,8 +21,10 @@ SET(HEAP_SOURCES _check.c _rectest.c hp_block.c hp_clear.c hp_close.c hp_create
|
||||
|
||||
MYSQL_ADD_PLUGIN(heap ${HEAP_SOURCES} STORAGE_ENGINE MANDATORY RECOMPILE_FOR_EMBEDDED)
|
||||
|
||||
ADD_EXECUTABLE(hp_test1 hp_test1.c)
|
||||
TARGET_LINK_LIBRARIES(hp_test1 heap mysys dbug strings)
|
||||
IF(WITH_UNIT_TESTS)
|
||||
ADD_EXECUTABLE(hp_test1 hp_test1.c)
|
||||
TARGET_LINK_LIBRARIES(hp_test1 heap mysys dbug strings)
|
||||
|
||||
ADD_EXECUTABLE(hp_test2 hp_test2.c)
|
||||
TARGET_LINK_LIBRARIES(hp_test2 heap mysys dbug strings)
|
||||
ADD_EXECUTABLE(hp_test2 hp_test2.c)
|
||||
TARGET_LINK_LIBRARIES(hp_test2 heap mysys dbug strings)
|
||||
ENDIF()
|
@ -50,6 +50,10 @@ MYSQL_ADD_PLUGIN(aria ${ARIA_SOURCES}
|
||||
STORAGE_ENGINE STATIC_ONLY DEFAULT
|
||||
RECOMPILE_FOR_EMBEDDED)
|
||||
|
||||
IF(NOT WITH_ARIA_STORAGE_ENGINE)
|
||||
RETURN()
|
||||
ENDIF()
|
||||
|
||||
TARGET_LINK_LIBRARIES(aria myisam)
|
||||
|
||||
MYSQL_ADD_EXECUTABLE(aria_ftdump maria_ftdump.c COMPONENT Server)
|
||||
@ -83,6 +87,7 @@ IF(WITH_UNIT_TESTS)
|
||||
|
||||
ADD_EXECUTABLE(ma_sp_test ma_sp_test.c)
|
||||
TARGET_LINK_LIBRARIES(ma_sp_test aria)
|
||||
ADD_SUBDIRECTORY(unittest)
|
||||
ENDIF()
|
||||
|
||||
IF (MSVC)
|
||||
@ -92,4 +97,3 @@ ENDIF()
|
||||
CMAKE_DEPENDENT_OPTION(USE_ARIA_FOR_TMP_TABLES "Use Aria for temporary tables" ON
|
||||
"WITH_ARIA_STORAGE_ENGINE" OFF)
|
||||
|
||||
ADD_SUBDIRECTORY(unittest)
|
||||
|
@ -74,6 +74,6 @@ SET(PERFSCHEMA_SOURCES ha_perfschema.h
|
||||
)
|
||||
|
||||
MYSQL_ADD_PLUGIN(perfschema ${PERFSCHEMA_SOURCES} STORAGE_ENGINE DEFAULT STATIC_ONLY)
|
||||
IF(WITH_PERFSCHEMA_STORAGE_ENGINE)
|
||||
IF(WITH_PERFSCHEMA_STORAGE_ENGINE AND WITH_UNIT_TESTS)
|
||||
ADD_SUBDIRECTORY(unittest)
|
||||
ENDIF()
|
||||
|
Loading…
x
Reference in New Issue
Block a user