<commit_before># journal cmake file


# journal core
set(JOURNALD_GPERF "core/journald-gperf.gperf")
set(JOURNALD_GPERF_C "src/journald-gperf.c")
message("-- generate ${JOURNALD_GPERF_C}")
execute_process(
	COMMAND ${GPERF}
	INPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${JOURNALD_GPERF}
	OUTPUT_FILE ${JOURNALD_GPERF_C}
)
add_library(journal_core_obj STATIC
	core/journald-kmsg.c
	core/journald-kmsg.h
	core/journald-syslog.c
	core/journald-syslog.h
	core/journald-stream.c
	core/journald-stream.h
	core/journald-server.c
	core/journald-server.h
	core/journald-console.c
	core/journald-console.h
	core/journald-wall.c
	core/journald-wall.h
	core/journald-native.c
	core/journald-native.h
	core/journald-rate-limit.c
	core/journald-rate-limit.h
	core/journal-internal.h
	${PROJECT_BINARY_DIR}/${JOURNALD_GPERF_C}
)
target_link_libraries(journal_core_obj journal_int_obj ${LIBUDEV_LIBRARIES} journal_capability_obj journal_label_obj journal_shared_obj)
target_link_libraries(journal_core_obj ${AUDIT_LIBRARIES})
target_link_libraries(journal_core_obj -pthread rt)


# journald
add_executable(journald
	journald/journald.c
)
target_link_libraries(journald journal_core_obj journal_int_obj journal_shared_obj)

# journalctl
add_executable(journalctl
	journalctl/journalctl.c
)
target_link_libraries(journalctl journal_int_obj journal_logs_obj journal_shared_obj)
#target_link_libraries(journalctl -pthread rt)

# install
install(TARGETS journald DESTINATION ${bindir})<commit_msg>* install journalctl program;<commit_after># journal cmake file


# journal core
set(JOURNALD_GPERF "core/journald-gperf.gperf")
set(JOURNALD_GPERF_C "src/journald-gperf.c")
message("-- generate ${JOURNALD_GPERF_C}")
execute_process(
	COMMAND ${GPERF}
	INPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${JOURNALD_GPERF}
	OUTPUT_FILE ${JOURNALD_GPERF_C}
)
add_library(journal_core_obj STATIC
	core/journald-kmsg.c
	core/journald-kmsg.h
	core/journald-syslog.c
	core/journald-syslog.h
	core/journald-stream.c
	core/journald-stream.h
	core/journald-server.c
	core/journald-server.h
	core/journald-console.c
	core/journald-console.h
	core/journald-wall.c
	core/journald-wall.h
	core/journald-native.c
	core/journald-native.h
	core/journald-rate-limit.c
	core/journald-rate-limit.h
	core/journal-internal.h
	${PROJECT_BINARY_DIR}/${JOURNALD_GPERF_C}
)
target_link_libraries(journal_core_obj journal_int_obj ${LIBUDEV_LIBRARIES} journal_capability_obj journal_label_obj journal_shared_obj)
target_link_libraries(journal_core_obj ${AUDIT_LIBRARIES})
target_link_libraries(journal_core_obj -pthread rt)


# journald
add_executable(journald
	journald/journald.c
)
target_link_libraries(journald journal_core_obj journal_int_obj journal_shared_obj)

# journalctl
add_executable(journalctl
	journalctl/journalctl.c
)
target_link_libraries(journalctl journal_int_obj journal_logs_obj journal_shared_obj)
#target_link_libraries(journalctl -pthread rt)

# install
install(TARGETS journald DESTINATION ${bindir})
install(TARGETS journalctl DESTINATION ${bindir})
{'fraction_non_alphanumeric': 0.09674202127659574, 'fraction_numerical': 0.0, 'mean_word_length': 7.266483516483516, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3173594', 'n_tokens_mistral': 1175, 'n_tokens_neox': 1165, 'n_words': 152}