From 3053775592406b623907d39e73f13e5f7be5af81 Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Wed, 1 Oct 2014 14:48:48 +0300 Subject: [PATCH] Tests aren't built as a default anymore. --- macros.cmake | 2 +- server/core/CMakeLists.txt | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/macros.cmake b/macros.cmake index 7e3e5d250..cc29a5e09 100644 --- a/macros.cmake +++ b/macros.cmake @@ -51,7 +51,7 @@ macro(set_variables) set(INSTALL_SYSTEM_FILES TRUE CACHE BOOL "Install init.d scripts and ldconf configuration files") # Build tests - set(BUILD_TESTS TRUE CACHE BOOL "Build tests") + set(BUILD_TESTS FALSE CACHE BOOL "Build tests") endmacro() diff --git a/server/core/CMakeLists.txt b/server/core/CMakeLists.txt index 2c7854de3..bddf95239 100644 --- a/server/core/CMakeLists.txt +++ b/server/core/CMakeLists.txt @@ -1,11 +1,12 @@ -file(GLOB FULLCORE_SRC *.c) -add_library(fullcore STATIC ${FULLCORE_SRC}) -target_link_libraries(fullcore log_manager utils pthread ${EMBEDDED_LIB} ssl aio rt crypt dl crypto inih z m stdc++) - +if(BUILD_TESTS) + file(GLOB FULLCORE_SRC *.c) + add_library(fullcore STATIC ${FULLCORE_SRC}) + target_link_libraries(fullcore log_manager utils pthread ${EMBEDDED_LIB} ssl aio rt crypt dl crypto inih z m stdc++) +endif() add_executable(maxscale atomic.c buffer.c spinlock.c gateway.c - gw_utils.c utils.c dcb.c load_utils.c session.c service.c server.c - poll.c config.c users.c hashtable.c dbusers.c thread.c gwbitmask.c - monitor.c adminusers.c secrets.c filter.c modutil.c hint.c housekeeper.c) + gw_utils.c utils.c dcb.c load_utils.c session.c service.c server.c + poll.c config.c users.c hashtable.c dbusers.c thread.c gwbitmask.c + monitor.c adminusers.c secrets.c filter.c modutil.c hint.c housekeeper.c) target_link_libraries(maxscale ${EMBEDDED_LIB} log_manager utils ssl aio pthread crypt dl crypto inih z rt m stdc++) install(TARGETS maxscale DESTINATION bin) @@ -18,5 +19,5 @@ target_link_libraries(maxpasswd log_manager utils pthread crypt crypto) install(TARGETS maxpasswd DESTINATION bin) if(BUILD_TESTS) -add_subdirectory(test) + add_subdirectory(test) endif() \ No newline at end of file