<commit_before>cmake_minimum_required(VERSION 2.8.11)
project (wotreplay-parser)

set(Boost_USE_MULTITHREADED     ON)
set(Boost_USE_STATIC_RUNTIME    OFF)
set(Boost_USE_STATIC_LIBS       ON)
set(CMAKE_MODULE_PATH           ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/ext/cmake_modules")
set(CMAKE_FIND_FRAMEWORK        LAST)
set(OPENSSL_USE_STATIC          1)
set(CMAKE_AUTOMOC               ON)
set(CMAKE_AUTOUIC               ON)
set(CMAKE_INCLUDE_CURRENT_DIR   ON)

if(USE_BOOST_REGEX STREQUAL 1)
  add_definitions(-DUSE_BOOST_REGEX)
  find_package(Boost 1.50.0 COMPONENTS filesystem program_options system regex REQUIRED)
else()
  find_package(Boost 1.50.0 COMPONENTS filesystem program_options system REQUIRED)
endif()

find_package(PNG REQUIRED)
find_package(ZLIB REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(TBB)
find_package(Qt5Widgets)
find_package(GD)
find_package(Git)


include_directories(AFTER src ext/jsoncpp/include ${Boost_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} ${PNG_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIRS} ${TBB_INCLUDE_DIRS} ${GD_INCLUDE_DIR} ${INCLUDE_DIRECTORIES})

link_directories(${LINK_DIRECTORIES})

if(${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
	set (CMAKE_CXX_FLAGS "/EHsc")
	add_definitions(-DZLIB_WINAPI)
	add_definitions(-D__func__=__FUNCTION__)
	add_definitions(-D__TBB_NO_IMPLICIT_LINKAGE)
	add_definitions(-Dchdir=_chdir)
	set(CMAKE_GENERATOR_TOOLSET "v140" CACHE STRING "Platform Toolset" FORCE) 
else()
	set (CMAKE_CXX_FLAGS "-Os -std=c++11")
endif()

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")

if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")<commit_msg>compatibility issue for include dir of openssl on mac<commit_after>cmake_minimum_required(VERSION 2.8.11)
project (wotreplay-parser)

set(Boost_USE_MULTITHREADED     ON)
set(Boost_USE_STATIC_RUNTIME    OFF)
set(Boost_USE_STATIC_LIBS       ON)
set(CMAKE_MODULE_PATH           ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/ext/cmake_modules")
set(CMAKE_FIND_FRAMEWORK        LAST)
set(OPENSSL_USE_STATIC          1)
set(CMAKE_AUTOMOC               ON)
set(CMAKE_AUTOUIC               ON)
set(CMAKE_INCLUDE_CURRENT_DIR   ON)

if(USE_BOOST_REGEX STREQUAL 1)
  add_definitions(-DUSE_BOOST_REGEX)
  find_package(Boost 1.50.0 COMPONENTS filesystem program_options system regex REQUIRED)
else()
  find_package(Boost 1.50.0 COMPONENTS filesystem program_options system REQUIRED)
endif()

find_package(PNG REQUIRED)
find_package(ZLIB REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(TBB)
find_package(Qt5Widgets)
find_package(GD)
find_package(Git)


include_directories(AFTER src ext/jsoncpp/include ${Boost_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} ${PNG_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR} ${TBB_INCLUDE_DIRS} ${GD_INCLUDE_DIR} ${INCLUDE_DIRECTORIES})

link_directories(${LINK_DIRECTORIES})

if(${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
	set (CMAKE_CXX_FLAGS "/EHsc")
	add_definitions(-DZLIB_WINAPI)
	add_definitions(-D__func__=__FUNCTION__)
	add_definitions(-D__TBB_NO_IMPLICIT_LINKAGE)
	add_definitions(-Dchdir=_chdir)
	set(CMAKE_GENERATOR_TOOLSET "v140" CACHE STRING "Platform Toolset" FORCE) 
else()
	set (CMAKE_CXX_FLAGS "-Os -std=c++11")
endif()

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")

if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
{'fraction_non_alphanumeric': 0.09847110650427572, 'fraction_numerical': 0.011401917595231926, 'mean_word_length': 7.483516483516484, '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': '2703010', 'n_tokens_mistral': 1676, 'n_tokens_neox': 1507, 'n_words': 219}