mirror of
https://github.com/falcosecurity/falco.git
synced 2025-10-21 19:44:57 +00:00
Signed-off-by: Lorenzo Fontana <lo@linux.com> Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
25 lines
543 B
CMake
25 lines
543 B
CMake
set(FALCO_TESTS_SOURCES
|
|
TestBase.cpp)
|
|
|
|
set(FALCO_TESTED_LIBRARIES
|
|
falco_engine)
|
|
|
|
option(FALCO_BUILD_TESTS "Determines whether to build tests." OFF)
|
|
|
|
if(FALCO_BUILD_TESTS)
|
|
enable_testing()
|
|
if(NOT TARGET catch)
|
|
include(FindCatch)
|
|
endif()
|
|
|
|
add_executable(falco_test ${FALCO_TESTS_SOURCES})
|
|
|
|
target_link_libraries(falco_test PUBLIC ${FALCO_TESTED_LIBRARIES} catch)
|
|
|
|
include(CTest)
|
|
include(Catch)
|
|
catch_discover_tests(falco_test)
|
|
|
|
add_custom_target(tests COMMAND ${CMAKE_CTEST_COMMAND} DEPENDS falco_test)
|
|
endif()
|