Commit 44fd1d5d9202f07e3ac246ee6b986d26eb71e73b
Committed by
Ben Klein
1 parent
27e05439
include closedtests.cmake
Showing
3 changed files
with
7 additions
and
6 deletions
CMakeLists.txt
| ... | ... | @@ -143,8 +143,9 @@ 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 | +if(EXISTS "${CLOSEDBR_DIR}/") | |
| 148 | + include("${CLOSEDBR_DIR}/test/closedtests.cmake") | |
| 148 | 149 | set(BR_THIRDPARTY_PLUGINS_DIR ${BR_THIRDPARTY_PLUGINS_DIR} "${CLOSEDBR_DIR}/plugins") |
| 149 | 150 | set(BR_THIRDPARTY_APPS_DIR ${BR_THIRDPARTY_APPS_DIR} "${CLOSEDBR_DIR}/app") |
| 150 | 151 | install(DIRECTORY ${CLOSEDBR_DIR}/share DESTINATION .) | ... | ... |
app/br/CMakeLists.txt
| ... | ... | @@ -7,7 +7,5 @@ target_link_libraries(br openbr ${CMAKE_THREAD_LIBS_INIT}) |
| 7 | 7 | qt5_use_modules(br ${QT_DEPENDENCIES}) |
| 8 | 8 | |
| 9 | 9 | install(TARGETS br RUNTIME DESTINATION bin) |
| 10 | - | |
| 11 | 10 | 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 | + | ... | ... |
app/examples/CMakeLists.txt
| ... | ... | @@ -5,5 +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 | - add_test(NAME ${EXAMPLE_BASENAME}_test WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND ${EXAMPLE_BASENAME}) | |
| 8 | + if(BUILD_TESTING) | |
| 9 | + add_test(NAME ${EXAMPLE_BASENAME}_test WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND ${EXAMPLE_BASENAME}) | |
| 10 | + endif(BUILD_TESTING) | |
| 9 | 11 | endforeach() | ... | ... |