Files
MaxScale/query_classifier/test/CMakeLists.txt
Markus Makela 2f65c3a7b8 MariaDB Connector C is build from source if it is not found on the system
The FindMariaDBConnector.cmake file now checks if the found library actually is
the MariaDB Connector-C library. If the found library is not the MariaDB
Connector-C, it will be built from source.
2016-02-03 11:35:01 +02:00

22 lines
869 B
CMake

# Include the embedded library headers
subdirs(MYSQL_INCLUDE_DIR_ALL ${MYSQL_EMBEDDED_INCLUDE_DIR})
foreach(DIR ${MYSQL_INCLUDE_DIR_ALL})
include_directories(${DIR})
endforeach()
include_directories(${MYSQL_EMMBEDDED_INCLUDE_DIR}/..)
if(${ERRMSG} MATCHES "ERRMSG-NOTFOUND")
message(FATAL_ERROR "The errmsg.sys file was not found, please define the path with -DERRMSG=<path>")
else()
if(${CMAKE_VERSION} VERSION_LESS 2.8)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${ERRMSG} ${CMAKE_CURRENT_BINARY_DIR})
else()
file(COPY ${ERRMSG} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
endif()
endif()
add_subdirectory(canonical_tests)
add_executable(classify classify.c)
target_link_libraries(classify query_classifier maxscale-common)
add_test(Internal-TestQueryClassifier classify ${CMAKE_CURRENT_SOURCE_DIR}/input.sql ${CMAKE_CURRENT_SOURCE_DIR}/expected.sql)