From 32a24dfd5c5ca2cac3c303e82c9ebe7cc7ff28ab Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Fri, 7 Dec 2018 22:12:12 +0100 Subject: core: begin implementing tests --- CMakeLists.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 86de9c9..6d8a867 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,7 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/Modules") include("ConanDependencies") include("SystemDependencies") +include("CUTE") ##### Wanda CORE ##### @@ -51,6 +52,7 @@ set(WANDA_CORE_LIBRARIES add_library("wanda" ${WANDA_CORE_SOURCES} ${WANDA_CORE_HEADERS}) target_link_libraries("wanda" ${WANDA_CORE_LIBRARIES}) +target_include_directories("wanda" INTERFACE $) set_target_properties("wanda" PROPERTIES PUBLIC_HEADER "${WANDA_CORE_HEADERS}") install(TARGETS "wanda" ARCHIVE DESTINATION "lib" PUBLIC_HEADER DESTINATION "include") @@ -100,3 +102,23 @@ set(WANDA_CONTROLLER_LIBRARIES add_executable("wandac" ${WANDA_CONTROLLER_SOURCES} ${WANDA_CONTROLLER_HEADERS}) target_link_libraries("wandac" ${WANDA_CONTROLLER_LIBRARIES}) install(TARGETS "wandac" RUNTIME DESTINATION "bin") + +##### Wanda Core Tests ##### +if(CUTE_FOUND) + set(WANDA_CORE_TESTS_SUITE_SOURCES + "tests/test_suite_xdg.cpp" + ) + + set(WANDA_CORE_TESTS_SUITE_HEADERS + "tests/test_suite_xdg.hpp" + ) + + set(WANDA_CORE_TESTS_LIBRARIES + "wanda" + "LIB::CUTE" + ) + + add_executable("wanda_core_tests" "tests/core_driver.cpp" ${WANDA_CORE_TESTS_SUITE_SOURCES} ${WANDA_CORE_TESTS_SUITE_HEADERS}) + target_link_libraries("wanda_core_tests" ${WANDA_CORE_TESTS_LIBRARIES}) + add_test(NAME "wanda_core_tests" COMMAND "wanda_core_tests") +endif() \ No newline at end of file -- cgit v1.2.3