Commit db00041a3cd03118f9081ed93d0d161d277b62c0
1 parent
81f24aa9
added flag to disable testing example apps
Showing
1 changed file
with
5 additions
and
2 deletions
app/examples/CMakeLists.txt
| 1 | +option(BR_TEST_EXAMPLES "Test OpenBR example applications" ON) | |
| 1 | 2 | file(GLOB EXAMPLES *.cpp) |
| 2 | 3 | foreach(EXAMPLE ${EXAMPLES}) |
| 3 | 4 | get_filename_component(EXAMPLE_BASENAME ${EXAMPLE} NAME_WE) |
| ... | ... | @@ -6,6 +7,8 @@ foreach(EXAMPLE ${EXAMPLES}) |
| 6 | 7 | target_link_libraries(${EXAMPLE_BASENAME} openbr ${BR_THIRDPARTY_LIBS}) |
| 7 | 8 | install(TARGETS ${EXAMPLE_BASENAME} RUNTIME DESTINATION bin) |
| 8 | 9 | if(BUILD_TESTING) |
| 9 | - add_test(NAME ${EXAMPLE_BASENAME}_test WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND ${EXAMPLE_BASENAME}) | |
| 10 | - endif(BUILD_TESTING) | |
| 10 | + if(BR_TEST_EXAMPLES) | |
| 11 | + add_test(NAME ${EXAMPLE_BASENAME}_test WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND ${EXAMPLE_BASENAME}) | |
| 12 | + endif() | |
| 13 | + endif() | |
| 11 | 14 | endforeach() | ... | ... |