Commit ad1463a81d6b2cf0f6e2313ff0a57d63e91d8a73
1 parent
9f1f38db
Remove old tests, add ENABLE_TESTS
Showing
3 changed files
with
10 additions
and
6 deletions
CMakeLists.txt
| ... | ... | @@ -143,8 +143,13 @@ set(BR_THIRDPARTY_PLUGINS_DIR CACHE PATH "") |
| 143 | 143 | set(BR_THIRDPARTY_APPS_DIR CACHE PATH "") |
| 144 | 144 | mark_as_advanced(BR_THIRDPARTY_PLUGINS_DIR) |
| 145 | 145 | mark_as_advanced(BR_THIRDPARTY_APPS_DIR) |
| 146 | -set(CLOSEDBR_DIR "${CMAKE_SOURCE_DIR}/../closedbr") | |
| 147 | -if(EXISTS "${CLOSEDBR_DIR}" AND IS_DIRECTORY "${CLOSEDBR_DIR}") | |
| 146 | +set(CLOSEDBR_DIR $ENV{CLOSEDBR}) | |
| 147 | +option(ENABLE_CLOSED_TESTS "Should the closedbr tests be built" OFF) | |
| 148 | +if(EXISTS "${CLOSEDBR_DIR}/") | |
| 149 | + set(BR_CLOSED_TESTING_DIR "${CLOSEDBR_DIR}/test") | |
| 150 | + if(ENABLE_CLOSED_TESTS) | |
| 151 | + include("${BR_CLOSED_TESTING_DIR}/closedtests.cmake") | |
| 152 | + endif(ENABLE_CLOSED_TESTS) | |
| 148 | 153 | set(BR_THIRDPARTY_PLUGINS_DIR ${BR_THIRDPARTY_PLUGINS_DIR} "${CLOSEDBR_DIR}/plugins") |
| 149 | 154 | set(BR_THIRDPARTY_APPS_DIR ${BR_THIRDPARTY_APPS_DIR} "${CLOSEDBR_DIR}/app") |
| 150 | 155 | install(DIRECTORY ${CLOSEDBR_DIR}/share DESTINATION .) | ... | ... |
app/br/CMakeLists.txt
| ... | ... | @@ -8,6 +8,6 @@ qt5_use_modules(br ${QT_DEPENDENCIES}) |
| 8 | 8 | |
| 9 | 9 | install(TARGETS br RUNTIME DESTINATION bin) |
| 10 | 10 | |
| 11 | -add_test(NAME br_initialize WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND br) | |
| 12 | -add_test(NAME br_objects WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND br -objects) | |
| 13 | -add_test(NAME br_draw_face_detection WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND br -algorithm DrawFaceDetection -enroll ../data/family.jpg) | |
| 11 | +if(BUILD_TESTING) | |
| 12 | + add_test(NAME br_initialize WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND br) | |
| 13 | +endif(BUILD_TESTING) | ... | ... |
app/examples/CMakeLists.txt
| ... | ... | @@ -5,5 +5,4 @@ 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 | - add_test(NAME ${EXAMPLE_BASENAME}_test WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND ${EXAMPLE_BASENAME}) | |
| 9 | 8 | endforeach() | ... | ... |