<commit_before>cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)

project(cppio)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(WORKSPACE_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/..)

find_package(Threads)
if(WIN32)
else(WIN32)

set (Boost_USE_STATIC_LIBS OFF)
set (Boost_USE_MULTITHREADED ON)
set(Python_ADDITIONAL_VERSIONS 2.7)
FIND_PACKAGE(PythonInterp)
FIND_PACKAGE(PythonLibs)

find_package(Boost COMPONENTS system REQUIRED python)
include_directories(${Boost_INCLUDE_DIRS})
endif(WIN32)

SET(CMAKE_CXX_FLAGS  "-Wall -fno-strict-aliasing -fexceptions -g --std=gnu++11 -mtune=generic ${PLATFORM_CXX_FLAGS} -fno-omit-frame-pointer")

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/catch)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/mingw-std-threads)

add_definitions(-DCPPIO_BLOCKING_INPROC=1)

set(cppio-sources
		src/iolinemanager.cpp
		src/message.cpp

		src/common/inproc.cpp
		src/common/select_poller.cpp
	)

if(WIN32)
	list(APPEND cppio-sources
		src/win32/win_socket.cpp
		src/win32/pipes.cpp
		src/win32/createlinemanager.cpp
		)
elseif(UNIX)
	list(APPEND cppio-sources
		src/posix/createlinemanager.cpp
		src/posix/io_socket.cpp)
endif(WIN32)

add_library(cppio SHARED ${cppio-sources})
target_link_libraries(cppio ${CMAKE_THREAD_LIBS_INIT})

if(WIN32)
target_link_libraries(cppio -lws2_32)
endif(WIN32)

include_directories(
	${CMAKE_CURRENT_SOURCE_DIR}/3rdparty
	${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/catch
	${CMAKE_CURRENT_BINARY_DIR}
	)<commit_msg>Trying to downgrade cmake version requirements<commit_after>cmake_minimum_required(VERSION 2.8.0 FATAL_ERROR)

project(cppio)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(WORKSPACE_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/..)

find_package(Threads)
if(WIN32)
else(WIN32)

set (Boost_USE_STATIC_LIBS OFF)
set (Boost_USE_MULTITHREADED ON)
set(Python_ADDITIONAL_VERSIONS 2.7)
FIND_PACKAGE(PythonInterp)
FIND_PACKAGE(PythonLibs)

find_package(Boost COMPONENTS system REQUIRED python)
include_directories(${Boost_INCLUDE_DIRS})
endif(WIN32)

SET(CMAKE_CXX_FLAGS  "-Wall -fno-strict-aliasing -fexceptions -g --std=gnu++11 -mtune=generic ${PLATFORM_CXX_FLAGS} -fno-omit-frame-pointer")

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/catch)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/mingw-std-threads)

add_definitions(-DCPPIO_BLOCKING_INPROC=1)

set(cppio-sources
		src/iolinemanager.cpp
		src/message.cpp

		src/common/inproc.cpp
	)

if(WIN32)
	list(APPEND cppio-sources
		src/win32/win_socket.cpp
		src/win32/pipes.cpp
		src/win32/createlinemanager.cpp
		)
elseif(UNIX)
	list(APPEND cppio-sources
		src/common/select_poller.cpp
		src/posix/createlinemanager.cpp
		src/posix/io_socket.cpp)
endif(WIN32)

add_library(cppio SHARED ${cppio-sources})
target_link_libraries(cppio ${CMAKE_THREAD_LIBS_INIT})

if(WIN32)
target_link_libraries(cppio -lws2_32)
endif(WIN32)

include_directories(
	${CMAKE_CURRENT_SOURCE_DIR}/3rdparty
	${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/catch
	${CMAKE_CURRENT_BINARY_DIR}
	)
{'fraction_non_alphanumeric': 0.10799396681749623, 'fraction_numerical': 0.02171945701357466, 'mean_word_length': 8.060109289617486, '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': '4758803', 'n_tokens_mistral': 1423, 'n_tokens_neox': 1317, 'n_words': 151}