From 1a33c1caef4580614ea049415aca2dc20ebc19de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Tue, 30 Jan 2018 08:19:08 +0200 Subject: [PATCH] Build CDC connector into the core test library The CDC connector can be build directly into the core testing library for testing purposes. This way we remove an unnecessary dependency on a library. This commit fixes the linkage failure of the cdc_datatypes test. --- maxscale-system-test/CMakeLists.txt | 11 ++++++++--- maxscale-system-test/utilities.cmake | 4 ---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/maxscale-system-test/CMakeLists.txt b/maxscale-system-test/CMakeLists.txt index df555690d..90899569e 100644 --- a/maxscale-system-test/CMakeLists.txt +++ b/maxscale-system-test/CMakeLists.txt @@ -50,10 +50,15 @@ add_library(testcore SHARED testconnections.cpp nodes.cpp mariadb_nodes.cpp maxs mariadb_func.cpp get_com_select_insert.cpp maxadmin_operations.cpp big_transaction.cpp sql_t1.cpp test_binlog_fnc.cpp get_my_ip.cpp big_load.cpp get_com_select_insert.cpp different_size.cpp fw_copy_rules maxinfo_func.cpp config_operations.cpp rds_vpc.cpp execute_cmd.cpp - blob_test.cpp) -target_link_libraries(testcore ${MYSQL_CLIENT} ${CDC_CONNECTOR_LIBRARIES} ${JANSSON_LIBRARIES} z nsl m pthread ssl dl rt crypto crypt) + blob_test.cpp + # Include the CDC connector in the core library + ${CMAKE_SOURCE_DIR}/../connectors/cdc-connector/cdc_connector.cpp) +target_link_libraries(testcore ${MYSQL_CLIENT} ${JANSSON_LIBRARIES} z nsl m pthread ssl dl rt crypto crypt) install(TARGETS testcore DESTINATION system-test) -add_dependencies(testcore connector-c cdc_connector jansson) +add_dependencies(testcore connector-c jansson) + +# Include the CDC connector headers +include_directories(${CMAKE_SOURCE_DIR}/../connectors/cdc-connector/) # Tool used to check backend state add_test_executable_notest(check_backend.cpp check_backend check_backend LABELS CONFIG) diff --git a/maxscale-system-test/utilities.cmake b/maxscale-system-test/utilities.cmake index a683b7fd0..a8f274166 100644 --- a/maxscale-system-test/utilities.cmake +++ b/maxscale-system-test/utilities.cmake @@ -103,10 +103,6 @@ ExternalProject_Add(connector-c include_directories(${CMAKE_BINARY_DIR}/include) set(MYSQL_CLIENT ${CMAKE_BINARY_DIR}/lib/mariadb/libmariadbclient.a CACHE INTERNAL "") -# Build the CDC connector -add_library(cdc_connector ${CMAKE_SOURCE_DIR}/../connectors/cdc-connector/cdc_connector.cpp) -include_directories(${CMAKE_SOURCE_DIR}/../connectors/cdc-connector/) - # # Check that all required components are present. To build even without them, # add e.g. -DHAVE_PHP=Y to the CMake invocation