Allow automatic tests discovery

This commit is contained in:
Pesc0
2023-07-11 15:50:25 +02:00
committed by wwmayer
parent bf6d07c402
commit a8dee2ed90
3 changed files with 15 additions and 0 deletions

View File

@@ -77,8 +77,10 @@ add_executable(Mesh_tests_run)
add_executable(Part_tests_run)
add_executable(Points_tests_run)
add_executable(Sketcher_tests_run)
add_subdirectory(lib)
add_subdirectory(src)
target_include_directories(Tests_run PUBLIC
${Python3_INCLUDE_DIRS}
${XercesC_INCLUDE_DIRS}
@@ -89,3 +91,13 @@ target_link_libraries(Tests_run
${Google_Tests_LIBS}
FreeCADApp
)
include(GoogleTest)
# discovers tests by asking the compiled test executable to enumerate its tests
set(CMAKE_GTEST_DISCOVER_TESTS_DISCOVERY_MODE PRE_TEST)
gtest_discover_tests(Tests_run)
gtest_discover_tests(Material_tests_run)
gtest_discover_tests(Mesh_tests_run)
gtest_discover_tests(Part_tests_run)
gtest_discover_tests(Points_tests_run)
gtest_discover_tests(Sketcher_tests_run)