Skip to content

Commit

Permalink
Fix CmakeTests and CPack
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Tsvetanov committed Mar 8, 2024
1 parent 65520d0 commit 05c8281
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -55,4 +57,4 @@ target_include_directories(Webframe_ORM_Example PUBLIC
)
add_executable(Webframe::ORM::Example ALIAS Webframe_ORM_Example)

#include(CPack)
include(CPack)
10 changes: 1 addition & 9 deletions tests/ORM/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 05c8281

Please sign in to comment.