<commit_before>cmake_minimum_required(VERSION 2.6)
project(Pfff)

# Compile optimized
set(CMAKE_C_FLAGS	"-O3")
set(CMAKE_CXX_FLAGS	"-O3")

# Libraries
add_subdirectory(libsrc/md5)
add_subdirectory(libsrc/mtwister)
add_subdirectory(libsrc/optionmanager)
add_subdirectory(libsrc/poly1305aes-embed)
add_subdirectory(libsrc/socket)

include_directories(libsrc/md5)
include_directories(libsrc/mtwister)
include_directories(libsrc/optionmanager)
include_directories(libsrc/poly1305aes-embed)
include_directories(libsrc/poly1305aes-20050218)
include_directories(libsrc/socket)

# Now collect the names of all files linked into the above libraries
# we'll link all those files into the final library
macro(GET_LIBRARY_SOURCES listvar library_name base_dir)
	get_property(sources TARGET ${library_name} PROPERTY SOURCES)
	foreach(file ${sources})
		# Somewhy CMake handles .S and other sources differently, passing full path for the former and just the name for the latter.
		string(REGEX MATCH "/" match_pathsep ${file})
		string(COMPARE EQUAL "${match_pathsep}" "/" has_pathsep)<commit_msg>Fixed optimization flag (app broke on Linux when compiled with -O3)<commit_after>cmake_minimum_required(VERSION 2.6)
project(Pfff)

# Compile optimization.
# NB! -O2 or -O3 produces faulty code (I guess due to poly1305aes somewhere).
add_definitions(-O1)

# Libraries
add_subdirectory(libsrc/md5)
add_subdirectory(libsrc/mtwister)
add_subdirectory(libsrc/optionmanager)
add_subdirectory(libsrc/poly1305aes-embed)
add_subdirectory(libsrc/socket)

include_directories(libsrc/md5)
include_directories(libsrc/mtwister)
include_directories(libsrc/optionmanager)
include_directories(libsrc/poly1305aes-embed)
include_directories(libsrc/poly1305aes-20050218)
include_directories(libsrc/socket)

# Now collect the names of all files linked into the above libraries
# we'll link all those files into the final library
macro(GET_LIBRARY_SOURCES listvar library_name base_dir)
	get_property(sources TARGET ${library_name} PROPERTY SOURCES)
	foreach(file ${sources})
		# Somewhy CMake handles .S and other sources differently, passing full path for the former and just the name for the latter.
		string(REGEX MATCH "/" match_pathsep ${file})
		string(COMPARE EQUAL "${match_pathsep}" "/" has_pathsep)
{'fraction_non_alphanumeric': 0.08366358432408631, 'fraction_numerical': 0.02553940995156319, 'mean_word_length': 7.477611940298507, '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': '6908205', 'n_tokens_mistral': 791, 'n_tokens_neox': 723, 'n_words': 183}