<commit_before>include (CheckCSourceCompiles)
include (CheckTypeSize)
include (CheckIncludeFile)
include (TestBigEndian)
include (${PROJECT_SOURCE_DIR}/cmake/PlatformDetect.cmake)
set (OUTPUT_DIR ${CMAKE_BINARY_DIR})

# Try to detect target platform
plib_detect_target_platform (PLIB_TARGET_PLATFORM)
plib_detect_c_compiler (PLIB_C_COMPILER)
plib_detect_target_os (PLIB_TARGET_OS)
plib_detect_os_bits (PLIB_OS_BITS)

# CMP0042, see http://www.cmake.org/Wiki/CMake_RPATH_handling
if (PLIB_TARGET_OS STREQUAL darwin)
        set (CMAKE_MACOSX_RPATH TRUE)
        set (CMAKE_SKIP_BUILD_RPATH FALSE)

        # Fix runtime paths on OS X 10.5 and less
        if (CMAKE_SYSTEM_VERSION VERSION_LESS "10.6.0")
                set (CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
        else()
                set (CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
        endif()

        set (CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
        set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

        list (FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)

        if ("${isSystemDir}" STREQUAL "-1")
                set (CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
        endif ("${isSystemDir}" STREQUAL "-1")
endif()

if (NOT EXISTS "${PROJECT_SOURCE_DIR}/platforms/${PLIB_TARGET_PLATFORM}/")
        message (FATAL_ERROR "PLib doesn't support unknown platform ${PLIB_TARGET_PLATFORM}")
endif()

include (${PROJECT_SOURCE_DIR}/platforms/${PLIB_TARGET_PLATFORM}/platform.cmake)

set (PLIB_INCLUDE_DIRS
        ${PROJECT_SOURCE_DIR}/src
        ${PROJECT_BINARY_DIR}
)

include_directories (
        ${CMAKE_BINARY_DIR}
        ${PROJECT_SOURCE_DIR}<commit_msg>cmake: Fix OS X kernel version for Leopard detection<commit_after>include (CheckCSourceCompiles)
include (CheckTypeSize)
include (CheckIncludeFile)
include (TestBigEndian)
include (${PROJECT_SOURCE_DIR}/cmake/PlatformDetect.cmake)
set (OUTPUT_DIR ${CMAKE_BINARY_DIR})

# Try to detect target platform
plib_detect_target_platform (PLIB_TARGET_PLATFORM)
plib_detect_c_compiler (PLIB_C_COMPILER)
plib_detect_target_os (PLIB_TARGET_OS)
plib_detect_os_bits (PLIB_OS_BITS)

# CMP0042, see http://www.cmake.org/Wiki/CMake_RPATH_handling
if (PLIB_TARGET_OS STREQUAL darwin)
        set (CMAKE_MACOSX_RPATH TRUE)
        set (CMAKE_SKIP_BUILD_RPATH FALSE)

        # Fix runtime paths on OS X 10.5 and less
        if (CMAKE_SYSTEM_VERSION VERSION_LESS "10.0.0")
                set (CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
        else()
                set (CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
        endif()

        set (CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
        set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

        list (FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)

        if ("${isSystemDir}" STREQUAL "-1")
                set (CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
        endif ("${isSystemDir}" STREQUAL "-1")
endif()

if (NOT EXISTS "${PROJECT_SOURCE_DIR}/platforms/${PLIB_TARGET_PLATFORM}/")
        message (FATAL_ERROR "PLib doesn't support unknown platform ${PLIB_TARGET_PLATFORM}")
endif()

include (${PROJECT_SOURCE_DIR}/platforms/${PLIB_TARGET_PLATFORM}/platform.cmake)

set (PLIB_INCLUDE_DIRS
        ${PROJECT_SOURCE_DIR}/src
        ${PROJECT_BINARY_DIR}
)

include_directories (
        ${CMAKE_BINARY_DIR}
        ${PROJECT_SOURCE_DIR}
{'fraction_non_alphanumeric': 0.09581013770876062, 'fraction_numerical': 0.007617931438617052, 'mean_word_length': 4.26040061633282, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3697576', 'n_tokens_mistral': 1272, 'n_tokens_neox': 1190, 'n_words': 217}