build(tests): allow to pass FALCO_TESTS_ARGUMENTS to the tests target

Signed-off-by: Lorenzo Fontana <lo@linux.com>
This commit is contained in:
Lorenzo Fontana 2020-05-08 03:43:32 +02:00 committed by poiana
parent e9e2547a44
commit 1d43d4eb40

View File

@ -18,6 +18,8 @@ set(FALCO_TESTS_SOURCES test_base.cpp engine/test_token_bucket.cpp engine/test_r
set(FALCO_TESTED_LIBRARIES falco_engine)
SET(FALCO_TESTS_ARGUMENTS "" CACHE STRING "Test arguments to pass to the Falco test suite")
option(FALCO_BUILD_TESTS "Determines whether to build tests." ON)
if(FALCO_BUILD_TESTS)
@ -47,6 +49,6 @@ if(FALCO_BUILD_TESTS)
include(CTest)
include(Catch)
catch_discover_tests(falco_test)
add_custom_target(tests COMMAND ${CMAKE_CTEST_COMMAND} DEPENDS falco_test)
separate_arguments(FALCO_TESTS_ARGUMENTS)
add_custom_target(tests COMMAND ${CMAKE_CTEST_COMMAND} ${FALCO_TESTS_ARGUMENTS} DEPENDS falco_test)
endif()