<commit_before>include (LibAddMacros)

file (GLOB HDR_FILES *.hpp)
add_headers (HDR_FILES)
add_cppheaders (HDR_FILES)
add_toolheaders (HDR_FILES)
include_directories (${CMAKE_CURRENT_SOURCE_DIR})

file (GLOB SRC_FILES *.cpp)
set (SOURCES ${SRC_FILES} ${HDR_FILES})

if (BUILD_SHARED OR BUILD_FULL)
	add_library (kdb-objects OBJECT ${SRC_FILES})
endif (BUILD_SHARED OR BUILD_FULL)

if (BUILD_SHARED)
	add_executable (kdb $<TARGET_OBJECTS:kdb-objects>)
	add_dependencies (kdb kdberrors_generated)

	target_link_libraries (kdb elektra-core elektra-kdb elektratools)

	install (TARGETS kdb DESTINATION bin)
endif (BUILD_SHARED)

if (BUILD_FULL)
	add_executable (kdb-full $<TARGET_OBJECTS:kdb-objects>)
	add_dependencies (kdb-full kdberrors_generated)

	target_link_libraries (kdb-full elektra-full elektratools-full)

	install (TARGETS kdb-full DESTINATION bin)
endif (BUILD_FULL)

if (BUILD_STATIC)
	add_executable (kdb-static ${SOURCES})
	add_dependencies (kdb-static kdberrors_generated)

	set_target_properties (kdb-static PROPERTIES LINKER_LANGUAGE CXX)
	set_target_properties (kdb-static PROPERTIES
			COMPILE_DEFINITIONS "HAVE_KDBCONFIG_H;ELEKTRA_STATIC")

	target_link_libraries (kdb-static
		elektra-static
		elektratools-static)

	#TODO: add helper libraries of plugins, too

	if (CMAKE_STATIC_FLAGS)
		set_target_properties (kdb-static PROPERTIES LINK_FLAGS
			${CMAKE_STATIC_FLAGS})
	endif()

	install (TARGETS kdb-static DESTINATION bin)
endif (BUILD_STATIC)<commit_msg>KDB Tool: Reformat CMake code<commit_after>include (LibAddMacros)

file (GLOB HDR_FILES *.hpp)
add_headers (HDR_FILES)
add_cppheaders (HDR_FILES)
add_toolheaders (HDR_FILES)
include_directories (${CMAKE_CURRENT_SOURCE_DIR})

file (GLOB SRC_FILES *.cpp)
set (SOURCES ${SRC_FILES} ${HDR_FILES})

if (BUILD_SHARED OR BUILD_FULL)
	add_library (kdb-objects OBJECT ${SRC_FILES})
endif (BUILD_SHARED OR BUILD_FULL)

if (BUILD_SHARED)
	add_executable (kdb $<TARGET_OBJECTS:kdb-objects>)
	add_dependencies (kdb kdberrors_generated)

	target_link_libraries (kdb elektra-core elektra-kdb elektratools)

	install (TARGETS kdb DESTINATION bin)
endif (BUILD_SHARED)

if (BUILD_FULL)
	add_executable (kdb-full $<TARGET_OBJECTS:kdb-objects>)
	add_dependencies (kdb-full kdberrors_generated)

	target_link_libraries (kdb-full elektra-full elektratools-full)

	install (TARGETS kdb-full DESTINATION bin)
endif (BUILD_FULL)

if (BUILD_STATIC)
	add_executable (kdb-static ${SOURCES})
	add_dependencies (kdb-static kdberrors_generated)

	set_target_properties (kdb-static PROPERTIES LINKER_LANGUAGE CXX)
	set_target_properties (kdb-static PROPERTIES COMPILE_DEFINITIONS "HAVE_KDBCONFIG_H;ELEKTRA_STATIC")

	target_link_libraries (kdb-static elektra-static elektratools-static)

	# TODO: add helper libraries of plugins, too

	if (CMAKE_STATIC_FLAGS)
		set_target_properties (kdb-static PROPERTIES LINK_FLAGS ${CMAKE_STATIC_FLAGS})
	endif ()

	install (TARGETS kdb-static DESTINATION bin)
endif (BUILD_STATIC)
{'fraction_non_alphanumeric': 0.08597437626432906, 'fraction_numerical': 0.0, 'mean_word_length': 7.1735537190082646, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4598898', 'n_tokens_mistral': 1192, 'n_tokens_neox': 1110, 'n_words': 237}