Allow automatic tests discovery
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user