<commit_before>cmake_minimum_required(VERSION 3.5)
project(calculate_python_wrapper NONE)

set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
add_library(calculate_python SHARED "${sources}")
target_compile_definitions(calculate_python PUBLIC "_CRT_SECURE_NO_WARNINGS")
set_target_properties(calculate_python PROPERTIES PREFIX "lib")

if(
    (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") OR
    (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
)
    target_link_libraries(calculate_python PUBLIC -static)
elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "MSVC")
    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
endif()

add_custom_command(
    TARGET calculate_python
    POST_BUILD
    COMMAND ${CMAKE_COMMAND} -E copy
            "$<TARGET_FILE:calculate_python>"
            "${CMAKE_CURRENT_SOURCE_DIR}/calculate"
)

find_program(PYTHON "python")
find_program(CONDA "conda")<commit_msg>Fixed bug in Linux and OS X<commit_after>cmake_minimum_required(VERSION 3.5)
project(calculate_python_wrapper NONE)

set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
add_library(calculate_python SHARED "${sources}")
target_compile_definitions(calculate_python PUBLIC "_CRT_SECURE_NO_WARNINGS")
set_target_properties(calculate_python PROPERTIES PREFIX "lib")

if(WIN32 OR CYGWIN)
    if(
        (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") OR
        (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
    )
        target_link_libraries(calculate_python PUBLIC -static)
    elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "MSVC")
        set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
        set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
    endif()
endif()

add_custom_command(
    TARGET calculate_python
    POST_BUILD
    COMMAND ${CMAKE_COMMAND} -E copy
            "$<TARGET_FILE:calculate_python>"
            "${CMAKE_CURRENT_SOURCE_DIR}/calculate"
)

find_program(PYTHON "python")
find_program(CONDA "conda")
{'fraction_non_alphanumeric': 0.09897959183673469, 'fraction_numerical': 0.003061224489795918, 'mean_word_length': 5.929328621908128, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1182329', 'n_tokens_mistral': 775, 'n_tokens_neox': 705, 'n_words': 111}