<commit_before>#    CMakeLists.txt for tip-l10n library
#	
#	@author zmij

cmake_minimum_required(VERSION 2.6)

if (NOT PROJECT_PREFIX)
    set(PROJECT_PREFIX tip)
endif()

if (PROJECT_VERSION)
    # Built as a subproject
    set(_pversion ${PROJECT_VERSION})
else()
    set(_pversion 0.1.0)
endif()

set(_pname ${PROJECT_PREFIX}-l10n)

if (${CMAKE_VERSION} VERSION_GREATER "3.0")
    cmake_policy(SET CMP0048 NEW)
    project(${_pname} VERSION ${_pversion})
else()
    project(${_pname})
    set(PROJECT_VERSION ${_pversion})
endif()

add_definitions("-std=c++11")

set(BOOST_COMPONENTS
        system
        thread
)

find_package(Boost COMPONENTS ${BOOST_COMPONENTS} REQUIRED)
find_package (Threads REQUIRED)
find_package(OpenSSL REQUIRED)

include_directories(
    ${Boost_INCLUDE_DIRS} 
    ${CMAKE_CURRENT_SOURCE_DIR}/include
)

set(TIP_L10N_LIB ${PROJECT_PREFIX}-l10n)

add_subdirectory(include/tip)
add_subdirectory(src)

get_directory_property(has_parent PARENT_DIRECTORY)
if (has_parent)
    set(TIP_L10N_LIB ${PROJECT_PREFIX}-l10n PARENT_SCOPE)
endif()
<commit_msg>AWM-258 simplify root project, set variables for subprojects<commit_after>#    CMakeLists.txt for tip-l10n library
#	
#	@author zmij

cmake_minimum_required(VERSION 2.6)

set(lib_name l10n)
string(TOUPPER ${lib_name} LIB_NAME)

if (NOT PROJECT_PREFIX)
    set(PROJECT_PREFIX tip)
endif()

if (PROJECT_VERSION)
    # Built as a subproject
    set(_pversion ${PROJECT_VERSION})
else()
    set(_pversion 0.1.0)
endif()

set(_pname ${PROJECT_PREFIX}-l10n)

if (${CMAKE_VERSION} VERSION_GREATER "3.0")
    cmake_policy(SET CMP0048 NEW)
    project(${_pname} VERSION ${_pversion})
else()
    project(${_pname})
    set(PROJECT_VERSION ${_pversion})
endif()

if(NOT CEREAL_INCLUDE_DIR)
    message(FATAL_ERROR "Please set CEREAL_INCLUDE_DIR (requires cereal fork https://github.com/zmij/cereal)")
endif()

add_definitions("-std=c++11")

set(BOOST_COMPONENTS
        system
        thread
)

find_package(Boost COMPONENTS ${BOOST_COMPONENTS} REQUIRED)
find_package (Threads REQUIRED)
find_package(OpenSSL REQUIRED)

include_directories(
    ${Boost_INCLUDE_DIRS} 
    ${CMAKE_CURRENT_SOURCE_DIR}/include
    ${CEREAL_INCLUDE_DIR}
)

set(TIP_${LIB_NAME}_LIB ${PROJECT_PREFIX}-${lib_name})

add_subdirectory(include/tip)
add_subdirectory(src)

get_directory_property(has_parent PARENT_DIRECTORY)
if (has_parent)
    set(TIP_${LIB_NAME}_LIB ${PROJECT_PREFIX}-${lib_name} CACHE INTERNAL "Name of tip-util library target")
    set(TIP_${LIB_NAME}_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE INTERNAL "Path to tip-util libaray includes" )
endif()

{'fraction_non_alphanumeric': 0.11484166348721862, 'fraction_numerical': 0.017932086989698587, 'mean_word_length': 5.621212121212121, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '7340097', 'n_tokens_mistral': 1058, 'n_tokens_neox': 991, 'n_words': 183}