<commit_before>include (LibAddMacros)

if (DEPENDENCY_PHASE
    AND NOT
	"${CMAKE_CXX_COMPILER_ID}"
	MATCHES
	"Clang")
	set_source_files_properties (range.c PROPERTIES COMPILE_FLAGS -Wno-psabi)
endif ()

add_plugin (range
	    SOURCES range.h
		    range.c
	    LINK_LIBRARIES "-lm"
	    ADD_TEST
	    TEST_README)

if (ADDTESTING_PHASE)
	if (CMAKE_C_COMPILER_ID
	    STREQUAL
	    "Clang"
	    OR CMAKE_CXX_COMPILER_ID
	       STREQUAL
	       "Clang")

		# Disable test for Clang + valgrind combination: https://github.com/ElektraInitiative/libelektra/issues/1871
		set_property (TEST "testmod_range"
			      PROPERTY LABELS
				       memleak)
	endif (CMAKE_C_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
endif (ADDTESTING_PHASE)
<commit_msg>Range: Specify library name instead of cmd option<commit_after>include (LibAddMacros)

if (DEPENDENCY_PHASE
    AND NOT
	"${CMAKE_CXX_COMPILER_ID}"
	MATCHES
	"Clang")
	set_source_files_properties (range.c PROPERTIES COMPILE_FLAGS -Wno-psabi)
endif ()

add_plugin (range
	    SOURCES range.h
		    range.c
	    LINK_LIBRARIES m
	    ADD_TEST
	    TEST_README)

if (ADDTESTING_PHASE)
	if (CMAKE_C_COMPILER_ID
	    STREQUAL
	    "Clang"
	    OR CMAKE_CXX_COMPILER_ID
	       STREQUAL
	       "Clang")

		# Disable test for Clang + valgrind combination: https://github.com/ElektraInitiative/libelektra/issues/1871
		set_property (TEST "testmod_range"
			      PROPERTY LABELS
				       memleak)
	endif (CMAKE_C_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
endif (ADDTESTING_PHASE)

{'fraction_non_alphanumeric': 0.07351077313054499, 'fraction_numerical': 0.005069708491761723, 'mean_word_length': 3.6034985422740524, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '950787', 'n_tokens_mistral': 690, 'n_tokens_neox': 605, 'n_words': 121}