From 05c8281c3f366656e6b921c73ae8caf12243edb5 Mon Sep 17 00:00:00 2001 From: Alex Tsvetanov Date: Fri, 8 Mar 2024 22:11:29 +0200 Subject: [PATCH] Fix CmakeTests and CPack --- CMakeLists.txt | 6 ++++-- tests/ORM/CMakeLists.txt | 10 +--------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a51fbae..8401cec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,9 @@ if(USE_MYSQL) endif() if(RUN_TESTS) - add_subdirectory("tests") + include(CTest) + enable_testing() + add_subdirectory("tests/") endif() # Generate example source code @@ -55,4 +57,4 @@ target_include_directories(Webframe_ORM_Example PUBLIC ) add_executable(Webframe::ORM::Example ALIAS Webframe_ORM_Example) -#include(CPack) +include(CPack) diff --git a/tests/ORM/CMakeLists.txt b/tests/ORM/CMakeLists.txt index d15fd0a..2475067 100644 --- a/tests/ORM/CMakeLists.txt +++ b/tests/ORM/CMakeLists.txt @@ -1,14 +1,6 @@ cmake_minimum_required(VERSION 3.14) -include(CTest) -enable_testing() - add_executable(Webframe_ORM_Tests main.cpp) target_link_libraries(Webframe_ORM_Tests PUBLIC Webframe::ORM) -add_test(NAME Usage COMMAND Webframe_ORM_Tests) -set_tests_properties(Usage - PROPERTIES - PASS_REGULAR_EXPRESSION "+ [0-9]+)" - FAIL_REGULAR_EXPRESSION "x [0-9]+)" -) +add_test(NAME Webframe-ORM-Tests COMMAND Webframe_ORM_Tests) \ No newline at end of file