From db00041a3cd03118f9081ed93d0d161d277b62c0 Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Mon, 14 Sep 2015 08:43:00 -0400 Subject: [PATCH] added flag to disable testing example apps --- app/examples/CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/examples/CMakeLists.txt b/app/examples/CMakeLists.txt index 44df0da..0579f0d 100644 --- a/app/examples/CMakeLists.txt +++ b/app/examples/CMakeLists.txt @@ -1,3 +1,4 @@ +option(BR_TEST_EXAMPLES "Test OpenBR example applications" ON) file(GLOB EXAMPLES *.cpp) foreach(EXAMPLE ${EXAMPLES}) get_filename_component(EXAMPLE_BASENAME ${EXAMPLE} NAME_WE) @@ -6,6 +7,8 @@ foreach(EXAMPLE ${EXAMPLES}) 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) + if(BR_TEST_EXAMPLES) + add_test(NAME ${EXAMPLE_BASENAME}_test WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND ${EXAMPLE_BASENAME}) + endif() + endif() endforeach() -- libgit2 0.21.4