From ff77af11bb849b081fce8d95ac4bb0466f8ba0ca Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Tue, 13 Dec 2016 17:17:21 -0600 Subject: [PATCH] -DDISABLE_TESTS=1 now disables the entire "make test" target, and does not require unittest++ to be a build dependency --- tests/CMakeLists.txt | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 2199c9b6..29fbe452 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -154,11 +154,9 @@ include_directories(${ZMQ_INCLUDE_DIRS}) # Include jsoncpp headers (needed for JSON parsing) include_directories("../thirdparty/jsoncpp/include") -############### SET TEST SOURCE FILES ################# -SET ( OPENSHOT_TEST_FILES tests.cpp ) - IF (NOT DISABLE_TESTS) - SET ( OPENSHOT_TEST_FILES ${OPENSHOT_TEST_FILES} + ############### SET TEST SOURCE FILES ################# + SET ( OPENSHOT_TEST_FILES tests.cpp Cache_Tests.cpp Clip_Tests.cpp Color_Tests.cpp @@ -172,18 +170,18 @@ IF (NOT DISABLE_TESTS) KeyFrame_Tests.cpp Point_Tests.cpp Timeline_Tests.cpp ) -ENDIF (NOT DISABLE_TESTS) -################ TESTER EXECUTABLE ################# -# Create unit test executable (openshot-test) -add_executable(openshot-test - tests.cpp - ${OPENSHOT_TEST_FILES} ) + ################ TESTER EXECUTABLE ################# + # Create unit test executable (openshot-test) + add_executable(openshot-test + tests.cpp + ${OPENSHOT_TEST_FILES} ) -# Link libraries to the new executable -target_link_libraries(openshot-test openshot ${UNITTEST++_LIBRARY}) + # Link libraries to the new executable + target_link_libraries(openshot-test openshot ${UNITTEST++_LIBRARY}) -#################### MAKE TEST ###################### -# Hook up the 'make test' target to the 'openshot-test' executable -ADD_CUSTOM_TARGET(test ${CMAKE_CURRENT_BINARY_DIR}/openshot-test) \ No newline at end of file + #################### MAKE TEST ###################### + # Hook up the 'make test' target to the 'openshot-test' executable + ADD_CUSTOM_TARGET(test ${CMAKE_CURRENT_BINARY_DIR}/openshot-test) +ENDIF (NOT DISABLE_TESTS) \ No newline at end of file