Changed the way some CMake functions are used to support older versions of CMake.
This commit is contained in:
parent
57ad30f105
commit
3cd8e29c4c
@ -1,5 +1,5 @@
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
message(STATUS "CMake version: ${CMAKE_VERSION}")
|
||||
include(macros.cmake)
|
||||
|
||||
enable_testing()
|
||||
|
@ -1,6 +1,11 @@
|
||||
file(COPY ${ERRMSG} DESTINATION ${CMAKE_CURRENT_BINARY_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 cp ${ERRMSG} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
else()
|
||||
file(COPY ${ERRMSG} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||
endif()
|
||||
endif()
|
||||
add_executable(canonizer canonizer.c)
|
||||
target_link_libraries(canonizer pthread query_classifier z dl ssl aio crypt crypto rt m ${EMBEDDED_LIB} fullcore stdc++)
|
||||
|
@ -1,3 +1,2 @@
|
||||
add_test(NAME ReadWriteSplitTest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/rwsplit.sh testrwsplit.log ${TEST_HOST} ${TEST_PORT_RW} ${TEST_MASTER_ID} ${TEST_USER} ${TEST_PASSWORD} ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
set_tests_properties(ReadWriteSplitTest PROPERTIES DEPENDS RunExecutable)
|
||||
add_subdirectory(test_hints)
|
@ -1,7 +1,3 @@
|
||||
file(COPY MaxScale_test.cnf DESTINATION ${CMAKE_BINARY_DIR}/etc)
|
||||
file(RENAME ${CMAKE_BINARY_DIR}/etc/MaxScale_test.cnf ${CMAKE_BINARY_DIR}/etc/MaxScale.cnf)
|
||||
#add_test(NAME RunExecutable COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/startmaxscale.sh "${CMAKE_BINARY_DIR}/bin/" "-c ${CMAKE_BINARY_DIR}")
|
||||
#set_tests_properties(RunExecutable PROPERTIES TIMEOUT 2)
|
||||
|
||||
#add_test(NAME KillExecutable COMMAND killall -KILL maxscale)
|
||||
#set_tests_properties(KillExecutable PROPERTIES DEPENDS StackHintTest ) #this needs to be the last test that requires a running maxscale
|
||||
if(BUILD_TESTS)
|
||||
install(FILES MaxScale_test.cnf DESTINATION etc RENAME MaxScale.cnf)
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user