<commit_before>project(arcus)
cmake_minimum_required(VERSION 2.8.12)

include(GNUInstallDirs)
include(CMakePackageConfigHelpers)

option(INSTALL_PYTHON_PACKAGE "Install the Python parts of Arcus" ON)
option(BUILD_EXAMPLES "Build the example programs" ON)

set(REQUIRED_PROTOBUF_VERSION 3.0.0)
find_package(Protobuf ${REQUIRED_PROTOBUF_VERSION} REQUIRED)

if(INSTALL_PYTHON_PACKAGE)
    find_package(PythonInterp 3.0.0 REQUIRED)
    set(PYTHON_SITE_PACKAGES_DIR ${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages CACHE PATH "Install location of Python package")
endif()

set(arcus_SRCS
    src/Socket.cpp
    src/SocketListener.cpp
)

set(arcus_HDRS
    src/Socket.h
    src/SocketListener.h
    src/Types.h
)

set(ARCUS_VERSION 0.1.0)
set(ARCUS_SOVERSION 0)

add_library(Arcus SHARED ${arcus_SRCS})
target_include_directories(Arcus PUBLIC
    ${PROTOBUF_INCLUDE_DIR}
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
    $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
target_link_libraries(Arcus PUBLIC
    ${PROTOBUF_LIBRARY}
)
set_target_properties(Arcus PROPERTIES
    FRAMEWORK TRUE
    VERSION ${ARCUS_VERSION}
    SOVERSION ${ARCUS_SOVERSION}
    PUBLIC_HEADER "${arcus_HDRS}"
    COMPILE_FLAGS "-std=c++11"
)
#target_compile_features(Arcus PRIVATE cxx_auto_type)
#target_compile_features(Arcus PRIVATE cxx_range_for)
#target_compile_features(Arcus PRIVATE cxx_nullptr)
#target_compile_features(Arcus PUBLIC cxx_deleted_functions)

add_subdirectory(examples)

install(TARGETS Arcus
    EXPORT Arcus-targets
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
    PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Arcus
)

install(EXPORT Arcus-targets
    DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Arcus<commit_msg>Use CMake 3.1's CXX_STANDARD variable to indicate we want C++11<commit_after>project(arcus)
cmake_minimum_required(VERSION 2.8.12)

include(GNUInstallDirs)
include(CMakePackageConfigHelpers)

option(INSTALL_PYTHON_PACKAGE "Install the Python parts of Arcus" ON)
option(BUILD_EXAMPLES "Build the example programs" ON)

set(REQUIRED_PROTOBUF_VERSION 3.0.0)
find_package(Protobuf ${REQUIRED_PROTOBUF_VERSION} REQUIRED)

if(INSTALL_PYTHON_PACKAGE)
    find_package(PythonInterp 3.0.0 REQUIRED)
    set(PYTHON_SITE_PACKAGES_DIR ${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages CACHE PATH "Install location of Python package")
endif()

if(NOT ${CMAKE_VERSION} VERSION_LESS 3.1)
    set(CMAKE_CXX_STANDARD 11)
else()
    set(CMAKE_CXX_FLAGS "-std=c++11")
endif()

set(arcus_SRCS
    src/Socket.cpp
    src/SocketListener.cpp
)

set(arcus_HDRS
    src/Socket.h
    src/SocketListener.h
    src/Types.h
)

set(ARCUS_VERSION 0.1.0)
set(ARCUS_SOVERSION 0)

add_library(Arcus SHARED ${arcus_SRCS})
target_include_directories(Arcus PUBLIC
    ${PROTOBUF_INCLUDE_DIR}
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
    $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
target_link_libraries(Arcus PUBLIC
    ${PROTOBUF_LIBRARY}
)
set_target_properties(Arcus PROPERTIES
    FRAMEWORK TRUE
    VERSION ${ARCUS_VERSION}
    SOVERSION ${ARCUS_SOVERSION}
    PUBLIC_HEADER "${arcus_HDRS}"
)

add_subdirectory(examples)

install(TARGETS Arcus
    EXPORT Arcus-targets
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
    PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Arcus
)

install(EXPORT Arcus-targets
    DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Arcus
{'fraction_non_alphanumeric': 0.08969100355482636, 'fraction_numerical': 0.010937927262783703, 'mean_word_length': 6.480572597137014, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '2074770', 'n_tokens_mistral': 1462, 'n_tokens_neox': 1357, 'n_words': 214}