<commit_before>#######################################################################
#
#       General
#
########################################################################

# CMake minimum version
cmake_minimum_required(VERSION 2.8)

# Project name
project(ircbot)

# Default build type is debug
if(CMAKE_BUILD_TYPE STREQUAL "")
    set(CMAKE_BUILD_TYPE "Debug")
endif()

# Setup some folders
set(SRC_DIR "${CMAKE_SOURCE_DIR}/src")
set(RES_DIR "${CMAKE_SOURCE_DIR}/data")
set(BIN_DIR "${CMAKE_SOURCE_DIR}/bin/${CMAKE_BUILD_TYPE}")

# Change CMake module path
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

# Change CMake output path
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${BIN_DIR}/lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${BIN_DIR}/lib")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${BIN_DIR}/bin")

# Setup CMake compilation flags
set(CMAKE_CXX_FLAGS "-std=gnu++0x")

# Link with static curl
add_definitions("-DCURL_STATICLIB")

########################################################################
#
#       Sources
#
########################################################################

# Header folder
include_directories("${SRC_DIR}")

# Executable name
set(EXECUTABLE "ircbot")

# Get sources
file(GLOB_RECURSE EXECUTABLE_SOURCES
    "${SRC_DIR}/*.h"
    "${SRC_DIR}/*.c"
    "${SRC_DIR}/*.cc"
)

# Add executable
add_executable(${EXECUTABLE} ${EXECUTABLE_SOURCES})

# If we're building on windows
if(WIN32)
	# Add the -mconsole compilation flag
    set_target_properties(${EXECUTABLE} PROPERTIES COMPILE_FLAGS "-mconsole")
endif()

########################################################################
#
#       Boost
#
########################################################################

# Custom Boost root
list(APPEND BOOST_ROOT
	"C:/Program Files/Boost/boost_1_57_0"
	"C:/Program Files (x86)/Boost/boost_1_57_0"
)

# Static libraries
set(Boost_USE_STATIC_LIBS ON)

# Multithreaded
set(Boost_USE_MULTITHREADED ON)

# Static runtime
set(Boost_USE_STATIC_RUNTIME OFF)

# Find boost installation
find_package(Boost 1.57.0 COMPONENTS
	log
	log_setup
	system
	filesystem
	date_time
	regex
	locale
	thread
)

# Not found
if(NOT Boost_FOUND)
	# Error
	message(FATAL_ERROR "Could not find Boost 1.57.0")
endif()

# Include boost headers
include_directories(${Boost_INCLUDE_DIRS})

# Link with boost libraries statically
target_link_libraries(${EXECUTABLE} ${Boost_LIBRARIES})

########################################################################
#
#       libircclient
#
########################################################################

# Custom libircclient root
list(APPEND IRCCLIENT_ROOT
	"C:/Program Files/libircclient"
	"C:/Program Files (x86)/libircclient"
)

# Find libircclient
find_package(IRCCLIENT)

# Not found
if(NOT IRCCLIENT_FOUND)
	# Error<commit_msg>Add support for boost 1.55.0<commit_after>#######################################################################
#
#       General
#
########################################################################

# CMake minimum version
cmake_minimum_required(VERSION 2.8)

# Project name
project(ircbot)

# Default build type is debug
if(CMAKE_BUILD_TYPE STREQUAL "")
    set(CMAKE_BUILD_TYPE "Debug")
endif()

# Setup some folders
set(SRC_DIR "${CMAKE_SOURCE_DIR}/src")
set(RES_DIR "${CMAKE_SOURCE_DIR}/data")
set(BIN_DIR "${CMAKE_SOURCE_DIR}/bin/${CMAKE_BUILD_TYPE}")

# Change CMake module path
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

# Change CMake output path
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${BIN_DIR}/lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${BIN_DIR}/lib")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${BIN_DIR}/bin")

# Setup CMake compilation flags
set(CMAKE_CXX_FLAGS "-std=gnu++0x")

# Link with static curl
add_definitions("-DCURL_STATICLIB")

########################################################################
#
#       Sources
#
########################################################################

# Header folder
include_directories("${SRC_DIR}")

# Executable name
set(EXECUTABLE "ircbot")

# Get sources
file(GLOB_RECURSE EXECUTABLE_SOURCES
    "${SRC_DIR}/*.h"
    "${SRC_DIR}/*.c"
    "${SRC_DIR}/*.cc"
)

# Add executable
add_executable(${EXECUTABLE} ${EXECUTABLE_SOURCES})

# If we're building on windows
if(WIN32)
	# Add the -mconsole compilation flag
    set_target_properties(${EXECUTABLE} PROPERTIES COMPILE_FLAGS "-mconsole")
endif()

########################################################################
#
#       Boost
#
########################################################################

# Custom Boost root
list(APPEND BOOST_ROOT
	"C:/Program Files/Boost/boost_1_57_0"
	"C:/Program Files/Boost/boost_1_55_0"
	"C:/Program Files (x86)/Boost/boost_1_57_0"
	"C:/Program Files (x86)/Boost/boost_1_55_0"
)

# Static libraries
set(Boost_USE_STATIC_LIBS ON)

# Multithreaded
set(Boost_USE_MULTITHREADED ON)

# Static runtime
set(Boost_USE_STATIC_RUNTIME OFF)

# Find boost installation
find_package(Boost 1.55.0 COMPONENTS
	log
	log_setup
	system
	filesystem
	date_time
	regex
	locale
	thread
)

# Not found
if(NOT Boost_FOUND)
	# Error
	message(FATAL_ERROR "Could not find Boost 1.55.0 or 1.57.0")
endif()

# Include boost headers
include_directories(${Boost_INCLUDE_DIRS})

# Link with boost libraries statically
target_link_libraries(${EXECUTABLE} ${Boost_LIBRARIES})

########################################################################
#
#       libircclient
#
########################################################################

# Custom libircclient root
list(APPEND IRCCLIENT_ROOT
	"C:/Program Files/libircclient"
	"C:/Program Files (x86)/libircclient"
)

# Find libircclient
find_package(IRCCLIENT)

# Not found
if(NOT IRCCLIENT_FOUND)
	# Error
{'fraction_non_alphanumeric': 0.2940661648870996, 'fraction_numerical': 0.011902678102573078, 'mean_word_length': 7.139601139601139, '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': '861610', 'n_tokens_mistral': 1927, 'n_tokens_neox': 1783, 'n_words': 348}