From 03ddb7bb40182a267b5ed7c759366eb6e1b65c1b Mon Sep 17 00:00:00 2001 From: Ben Klein Date: Wed, 5 Nov 2014 12:15:24 -0500 Subject: [PATCH] add tests if BUILD_TESTING enabled --- app/examples/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+), 0 deletions(-) diff --git a/app/examples/CMakeLists.txt b/app/examples/CMakeLists.txt index c735a70..44df0da 100644 --- a/app/examples/CMakeLists.txt +++ b/app/examples/CMakeLists.txt @@ -5,4 +5,7 @@ foreach(EXAMPLE ${EXAMPLES}) qt5_use_modules(${EXAMPLE_BASENAME} ${QT_DEPENDENCIES}) target_link_libraries(${EXAMPLE_BASENAME} openbr ${BR_THIRDPARTY_LIBS}) install(TARGETS ${EXAMPLE_BASENAME} RUNTIME DESTINATION bin) + if(BUILD_TESTING) + add_test(NAME ${EXAMPLE_BASENAME}_test WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND ${EXAMPLE_BASENAME}) + endif(BUILD_TESTING) endforeach() -- libgit2 0.21.4