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

if (CMAKE_SIZEOF_VOID_P EQUAL 8)
	message(STATUS "64 bits compiler detected")
	set(APP_BUILD_PLATFORM 64)
	set(APP_BUILD_PLATFORM_NAME "x86_64")
	set(CPP_LIBRARY_DIR "lib64")
else (CMAKE_SIZEOF_VOID_P EQUAL 8)
	message(STATUS "32 bits compiler detected")
	set(APP_BUILD_PLATFORM 32)
	set(APP_BUILD_PLATFORM_NAME "i686")
	set(CPP_LIBRARY_DIR "lib")
endif (CMAKE_SIZEOF_VOID_P EQUAL 8)


if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
	add_definitions(-D_GNU_SOURCE -DLINUX_BUILD)
endif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")


if (UNIX)
	set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/target/bin)
	set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/target/lib)
	set (CTEST_BINARY_DIRECTORY ${CMAKE_BINARY_DIR}/target/tests/bin)
else (UNIX)
	if (WIN32)
		set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/target/bin)
		set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/target/lib)
		set (CTEST_BINARY_DIRECTORY ${CMAKE_BINARY_DIR}/target/lib)
	endif (WIN32)
endif (UNIX)

set(RUNTIME_DIR "bin")
set(CPP_INCLUDE_DIR "include")
set(SHARED_DIR "share")
set(GRU_SHARED_DIR ${SHARED_DIR}/gru)
set(BUILD_WITH_UNIT_TESTS ON CACHE BOOL "Build unit tests")
<commit_msg>UPD: isolate Linux-specific build rules<commit_after>project(gru)
cmake_minimum_required(VERSION 2.6)

if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
	add_definitions(-DLINUX_BUILD -D_GNU_SOURCE)
	if (CMAKE_SIZEOF_VOID_P EQUAL 8)
		message(STATUS "64 bits compiler detected")
		set(APP_BUILD_PLATFORM 64)
		set(APP_BUILD_PLATFORM_NAME "x86_64")
		set(CPP_LIBRARY_DIR "lib64")
	else (CMAKE_SIZEOF_VOID_P EQUAL 8)
		message(STATUS "32 bits compiler detected")
		set(APP_BUILD_PLATFORM 32)
		set(APP_BUILD_PLATFORM_NAME "i686")
		set(CPP_LIBRARY_DIR "lib")
	endif (CMAKE_SIZEOF_VOID_P EQUAL 8)

	if(EXISTS "/etc/redhat-release")
			add_definitions(-D__RH_DISTRO__)
	endif(EXISTS "/etc/redhat-release")

	if(EXISTS "/etc/debian_version")
			add_definitions(-D__DEBIAN_DISTRO__)
	endif(EXISTS "/etc/debian_version")

	if(EXISTS "/etc/ubuntu-release")
			add_definitions(-D__UBUNTU_DISTRO__)
	endif(EXISTS "/etc/ubuntu-release")
else (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
	message(STATUS "Compiling for " ${CMAKE_SYSTEM_NAME} "")
	if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
		set(CMAKE_MACOSX_RPATH TRUE)
		add_definitions(-D__OSX__)
	endif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")

endif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")

if (UNIX)
	set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/target/bin)
	set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/target/lib)
	set (CTEST_BINARY_DIRECTORY ${CMAKE_BINARY_DIR}/target/tests/bin)
else (UNIX)
	if (WIN32)
		set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/target/bin)
		set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/target/lib)
		set (CTEST_BINARY_DIRECTORY ${CMAKE_BINARY_DIR}/target/lib)
	endif (WIN32)
endif (UNIX)

set(RUNTIME_DIR "bin")
set(CPP_INCLUDE_DIR "include")
set(SHARED_DIR "share")
set(GRU_SHARED_DIR ${SHARED_DIR}/gru)
set(BUILD_WITH_UNIT_TESTS ON CACHE BOOL "Build unit tests")

{'fraction_non_alphanumeric': 0.1175305381313965, 'fraction_numerical': 0.017167381974248927, 'mean_word_length': 7.607954545454546, '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': '861560', 'n_tokens_mistral': 1372, 'n_tokens_neox': 1228, 'n_words': 208}