From f9c16675dc625c124345bb440aa9604af61ddb8d Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Mon, 7 Mar 2016 15:13:34 +0100 Subject: build: Add check target, fix packaging This adds a build target 'check', which executes a test suite for every daemon/library. Every test suite consists of a test driver that executes a function in a file with the same name as the function. The compile_debug script executes the 'check' target to validate there are no regressions. Packaging is also fixed and the prototype can be shipped as a tarball. --- CMakeLists.txt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 1bfbeb47..1041197c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,6 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") -#set(CMAKE_VERBOSE_MAKEFILE ON) project(ouroboros C) @@ -41,14 +40,13 @@ configure_file( "${CMAKE_CURRENT_BINARY_DIR}/ouroboros.pc" @ONLY) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ouroboros.pc" - DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig") + DESTINATION "lib/pkgconfig") + +enable_testing() +add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}) add_subdirectory(include) add_subdirectory(src) -add_subdirectory(tests) - -#include(FeatureSummary) -#print_enabled_features() # Uninstall target configure_file( @@ -60,11 +58,15 @@ add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/cmake/cmake_uninstall.cmake) set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PACKAGE_DESCRIPTION}") -set(CPACK_PACKAGE_VENDOR "Unknown") set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README") set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") set(CPACK_PACKAGE_VERSION_MAJOR "${PACKAGE_VERSION_MAJOR}") set(CPACK_PACKAGE_VERSION_MINOR "${PACKAGE_VERSION_MINOR}") set(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") +set(CPACK_GENERATOR "TGZ") +set(CPACK_SOURCE_GENERATOR "TGZ") include(CPack) + +#include(FeatureSummary) +#print_enabled_features() -- cgit v1.2.3