Make query classifier self-contained.

Only the query classifier needs the functionality of the embedded
server, while the rest of MaxScale is content with the client
library or Connector/C.

This have now been rearranged so that query-classifier links with
the embedded static library and then explicitly exports its own
functions using the query_classifier.map linker script. That way
query classifier will use the embedded library, while the rest of
maxscale use the client library, and this without conflicts.

Currently, query_classifier is not linked to maxscale-common,
but executables must link to maxscale-common and query_classifier.
This commit is contained in:
Johan Wikman
2016-01-15 16:26:56 +02:00
parent 0b742977dd
commit 42b1722e49
11 changed files with 126 additions and 35 deletions

View File

@ -1,8 +1,8 @@
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
add_executable(harness_ui harness_ui.c harness_common.c)
add_executable(harness harness_util.c harness_common.c)
target_link_libraries(harness_ui maxscale-common)
target_link_libraries(harness maxscale-common)
target_link_libraries(harness_ui maxscale-common query_classifier)
target_link_libraries(harness maxscale-common query_classifier)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${ERRMSG} ${CMAKE_CURRENT_BINARY_DIR})
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/harness.cnf ${CMAKE_CURRENT_BINARY_DIR})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/testdriver.sh ${CMAKE_CURRENT_BINARY_DIR}/testdriver.sh @ONLY)