From 7117eae2b29046ca4a5f67052a0776b9d9ca2ff2 Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Mon, 13 Oct 2014 12:12:40 +0300 Subject: [PATCH 1/2] CMake will now properly create the log folder when installing. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ab5509402..54c447894 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,7 +98,7 @@ message(STATUS "Installing MaxScale to: ${CMAKE_INSTALL_PREFIX}/") install(FILES server/MaxScale_template.cnf DESTINATION etc) install(FILES ${ERRMSG} DESTINATION mysql) install(FILES ${DOCS} DESTINATION Documentation) - +install(DIRECTORY DESTINATION log) # See if we are on a RPM-capable or DEB-capable system find_program(RPMBUILD rpmbuild) find_program(DEBBUILD dpkg-buildpackage) From d335794715b21f9a8a692e73cdb74fc36fc5b0da Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Mon, 13 Oct 2014 13:57:08 +0300 Subject: [PATCH 2/2] Added a 'buildtests' target that only builds the test version. --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 54c447894..e6fbec0d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -136,10 +136,15 @@ set(CPACK_RPM_USER_FILELIST "%ignore /etc/init.d") set(CPACK_RPM_USER_FILELIST "%ignore /etc/ld.so.conf.d") set(CPACK_RPM_USER_FILELIST "%ignore /etc") include(CPack) +add_custom_target(buildtests + COMMAND ${CMAKE_COMMAND} -DDEPS_OK=Y -DBUILD_TESTS=Y -DBUILD_TYPE=Debug -DINSTALL_DIR=${CMAKE_BINARY_DIR} -DINSTALL_SYSTEM_FILES=N ${CMAKE_SOURCE_DIR} + COMMAND make + COMMENT "Building test suite..." VERBATIM +) add_custom_target(testall COMMAND ${CMAKE_COMMAND} -DDEPS_OK=Y -DBUILD_TESTS=Y -DBUILD_TYPE=Debug -DINSTALL_DIR=${CMAKE_BINARY_DIR} -DINSTALL_SYSTEM_FILES=N ${CMAKE_SOURCE_DIR} COMMAND make install COMMAND /bin/sh -c "${CMAKE_BINARY_DIR}/bin/maxscale -c ${CMAKE_BINARY_DIR} &>/dev/null" COMMAND /bin/sh -c "make test || echo \"Test results written to: ${CMAKE_BINARY_DIR}/Testing/Temporary/\"" COMMAND killall maxscale - COMMENT "Running full test suite" VERBATIM) \ No newline at end of file + COMMENT "Running full test suite..." VERBATIM) \ No newline at end of file