diff --git a/CMakeLists.txt b/CMakeLists.txt index cabe1118..5c36ded0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -610,6 +610,10 @@ add_subdirectory(docker) list(APPEND CMAKE_MODULE_PATH "${SYSDIG_DIR}/cmake/modules") +# Add path for custom CMake modules +list(APPEND CMAKE_MODULE_PATH + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules") + if(CMAKE_SYSTEM_NAME MATCHES "Linux") add_subdirectory("${SYSDIG_DIR}/driver" "${PROJECT_BINARY_DIR}/driver") include(FindMakedev) @@ -624,6 +628,7 @@ set(FALCO_BIN_DIR bin) add_subdirectory(scripts) add_subdirectory(userspace/engine) add_subdirectory(userspace/falco) +add_subdirectory(tests) set(CPACK_PACKAGE_NAME "${PACKAGE_NAME}") diff --git a/tests/TestBase.cpp b/tests/TestBase.cpp new file mode 100644 index 00000000..0e2d84d1 --- /dev/null +++ b/tests/TestBase.cpp @@ -0,0 +1,5 @@ +#define CATCH_CONFIG_MAIN +#include + +TEST_CASE( "1: All test cases reside in other .cpp files (empty)", "[multi-file:1]" ) { +} diff --git a/userspace/engine/CMakeLists.txt b/userspace/engine/CMakeLists.txt index 820643ce..ef7bc25d 100644 --- a/userspace/engine/CMakeLists.txt +++ b/userspace/engine/CMakeLists.txt @@ -24,7 +24,7 @@ include_directories("${NJSON_INCLUDE}") include_directories("${CURL_INCLUDE_DIR}") include_directories("${TBB_INCLUDE_DIR}") -add_library(falco_engine STATIC +set(FALCO_ENGINE_SOURCE_FILES rules.cpp falco_common.cpp falco_engine.cpp @@ -33,6 +33,8 @@ add_library(falco_engine STATIC token_bucket.cpp formats.cpp) +add_library(falco_engine STATIC ${FALCO_ENGINE_SOURCE_FILES}) + target_include_directories(falco_engine PUBLIC "${LUAJIT_INCLUDE}" "${NJSON_INCLUDE}" @@ -43,6 +45,7 @@ target_link_libraries(falco_engine "${LPEG_LIB}" "${LYAML_LIB}" "${LIBYAML_LIB}") +# --coverage) # todo: enable only if coverage enabled configure_file(config_falco_engine.h.in config_falco_engine.h)