diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2012-10-30 23:05:55 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2012-10-30 23:05:55 +0100 |
commit | bc5232a65d395f60fdc46703f30d051a70470382 (patch) | |
tree | fd26e1d7a1917dd85825fc66f5e7934ec7729dd4 /storage | |
parent | 8d2c12a924582f822d684b78410bd82aac748617 (diff) | |
download | mariadb-git-bc5232a65d395f60fdc46703f30d051a70470382.tar.gz |
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
Diffstat (limited to 'storage')
-rw-r--r-- | storage/heap/CMakeLists.txt | 10 | ||||
-rw-r--r-- | storage/maria/CMakeLists.txt | 6 | ||||
-rw-r--r-- | storage/perfschema/CMakeLists.txt | 2 |
3 files changed, 12 insertions, 6 deletions
diff --git a/storage/heap/CMakeLists.txt b/storage/heap/CMakeLists.txt index 0b9372bf224..3a0c2e7271c 100644 --- a/storage/heap/CMakeLists.txt +++ b/storage/heap/CMakeLists.txt @@ -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()
\ No newline at end of file diff --git a/storage/maria/CMakeLists.txt b/storage/maria/CMakeLists.txt index 9ca198873d1..0f30f8f3156 100644 --- a/storage/maria/CMakeLists.txt +++ b/storage/maria/CMakeLists.txt @@ -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) diff --git a/storage/perfschema/CMakeLists.txt b/storage/perfschema/CMakeLists.txt index 7702b7365af..528e7806755 100644 --- a/storage/perfschema/CMakeLists.txt +++ b/storage/perfschema/CMakeLists.txt @@ -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() |