1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
|
set(PATTERNDB_SOURCES
radix.c
radix.h
patterndb.c
patterndb.h
pdb-load.c
pdb-load.h
pdb-rule.c
pdb-rule.h
pdb-file.c
pdb-file.h
pdb-error.c
pdb-error.h
pdb-action.c
pdb-action.h
pdb-program.c
pdb-program.h
pdb-example.c
pdb-example.h
pdb-ruleset.c
pdb-ruleset.h
pdb-context.c
pdb-context.h
pdb-ratelimit.c
pdb-ratelimit.h
pdb-lookup-params.h
pdb-lookup-params.c
correlation.c
correlation.h
correlation-key.c
correlation-key.h
correlation-context.c
correlation-context.h
synthetic-message.c
synthetic-message.h
synthetic-context.c
synthetic-context.h
timerwheel.c
timerwheel.h
patternize.c
patternize.h
id-counter.h
id-counter.c
)
set(PATTERNDB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
add_library(patterndb ${PATTERNDB_SOURCES})
# The radix tree uses unsigned char internally but passes these values to
# string.h functions, which trigger a lot of harmless warnings. Of course
# these could be fixed by adding a lot of casts to the code, but I
# considered these to be less readable, than simply adding -Wno-pointer-sign
# warning option.
#
set_target_properties(patterndb PROPERTIES COMPILE_FLAGS "-fPIC -Wno-pointer-sign")
target_include_directories(patterndb INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(patterndb PUBLIC syslog-ng)
set(CORRELATION_SOURCES
stateful-parser.c
stateful-parser.h
dbparser.c
dbparser.h
correlation-parser.c
correlation-parser.h
correlation-plugin.c
groupingby.c
groupingby.h
grouping-parser.c
grouping-parser.h
group-lines.c
group-lines.h
)
add_module(
TARGET correlation
GRAMMAR correlation-grammar
INCLUDES ${CMAKE_CURRENT_SOURCE_DIR} ${PATTERNDB_INCLUDE_DIR}
DEPENDS patterndb
SOURCES ${CORRELATION_SOURCES}
)
add_subdirectory(pdbtool)
add_test_subdirectory(tests)
|