skip adding add_check command if parent project already has one

This commit is contained in:
Pavel Kartavyy 2017-02-09 18:35:58 +03:00
parent b28f41250c
commit eceb688c7f

View File

@ -155,7 +155,11 @@ endif (TEST_COVERAGE)
# Run tests with "make check"
if (ENABLE_TESTS)
message (STATUS "Tests are enabled")
include (cmake/add_check.cmake)
if (TARGET check)
message (STATUS "Target check already exists")
else ()
include (cmake/add_check.cmake)
endif ()
endif (ENABLE_TESTS)
# Installation prefix