Commit 03ddb7bb40182a267b5ed7c759366eb6e1b65c1b
1 parent
ad1463a8
add tests if BUILD_TESTING enabled
Showing
1 changed file
with
3 additions
and
0 deletions
app/examples/CMakeLists.txt
| ... | ... | @@ -5,4 +5,7 @@ foreach(EXAMPLE ${EXAMPLES}) |
| 5 | 5 | qt5_use_modules(${EXAMPLE_BASENAME} ${QT_DEPENDENCIES}) |
| 6 | 6 | target_link_libraries(${EXAMPLE_BASENAME} openbr ${BR_THIRDPARTY_LIBS}) |
| 7 | 7 | install(TARGETS ${EXAMPLE_BASENAME} RUNTIME DESTINATION bin) |
| 8 | + if(BUILD_TESTING) | |
| 9 | + add_test(NAME ${EXAMPLE_BASENAME}_test WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND ${EXAMPLE_BASENAME}) | |
| 10 | + endif(BUILD_TESTING) | |
| 8 | 11 | endforeach() | ... | ... |