diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 02c8f9b4..4b3e4cfb 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -224,8 +224,16 @@ IF (NOT DISABLE_TESTS) # Link libraries to the new executable target_link_libraries(openshot-test openshot ${UNITTEST++_LIBRARY}) + # Add cmake policy + cmake_policy(PUSH) + if(POLICY CMP0037) + cmake_policy(SET CMP0037 OLD) + endif() + #################### MAKE TEST ###################### # Hook up the 'make test' target to the 'openshot-test' executable - ADD_TEST(NAME openshot-test - COMMAND ${CMAKE_CURRENT_BINARY_DIR}/openshot-test) + ADD_CUSTOM_TARGET(test ${CMAKE_CURRENT_BINARY_DIR}/openshot-test) + + # Remove cmake policy + cmake_policy(POP) ENDIF (NOT DISABLE_TESTS)