<commit_before>include_directories( ./external/tea )
include_directories( ./external/xxtea )
include_directories( ./external/zlib )
include_directories( ./include )

set( TEA_SRCS
    ./external/tea/tea.c
    ./external/xxtea/xxtea.c
)

set( ZLIB_UNCOMP_SRCS
    ./external/zlib/adler32.c
    ./external/zlib/crc32.c
    ./external/zlib/infback.c
    ./external/zlib/inffast.c
    ./external/zlib/inflate.c
    ./external/zlib/inftrees.c
    ./external/zlib/uncompr.c
    ./external/zlib/zutil.c
)

set( ZLIB_COMP_SRCS
    ./external/zlib/deflate.c
    ./external/zlib/compress.c
    ./external/zlib/trees.c
)

set( SRCS
    ./src/npk.c
    ./src/npk_common.c
)

set( SRCS_DEV
    ./src/npk_dev.c
)

if( WIN32 )
    if( NOT CMAKE_CL_64 )
        add_definitions( -D_USE_32BIT_TIME_T )
    endif( NOT CMAKE_CL_64 )
    if( BUILD_SHARED_LIBS )
        add_definitions( -DNPK_DLL -DNPK_EXPORTS )
    endif( BUILD_SHARED_LIBS )
endif( WIN32 )

if( USE_ZLIB_PREFIX )
    add_definitions( -DZ_PREFIX )
endif( USE_ZLIB_PREFIX )

if( USE_NPK_PREFIX )
    add_definitions( -DNPK_PREFIX )
    add_definitions( -DNPK_PREFIX_NAME=${NPK_PREFIX} )
endif( USE_NPK_PREFIX )

if( CASE_SESITIVE )
    add_definitions( -DNPK_CASESENSITIVE )
endif( CASE_SESITIVE )

if( DEV_MODE )
    add_definitions( -DNPK_DEV )
    add_library( libnpk ${SRCS} ${SRCS_DEV} ${TEA_SRCS} ${ZLIB_COMP_SRCS} ${ZLIB_UNCOMP_SRCS} )
else( DEV_MODE )
    add_library( libnpk ${SRCS} ${TEA_SRCS} ${ZLIB_UNCOMP_SRCS} )
endif( DEV_MODE )

enable_testing()
add_subdirectory( tests )
<commit_msg>Add install command for library and headers<commit_after>include_directories( ./external/tea )
include_directories( ./external/xxtea )
include_directories( ./external/zlib )
include_directories( ./include )

set( TEA_SRCS
    ./external/tea/tea.c
    ./external/xxtea/xxtea.c
)

set( ZLIB_UNCOMP_SRCS
    ./external/zlib/adler32.c
    ./external/zlib/crc32.c
    ./external/zlib/infback.c
    ./external/zlib/inffast.c
    ./external/zlib/inflate.c
    ./external/zlib/inftrees.c
    ./external/zlib/uncompr.c
    ./external/zlib/zutil.c
)

set( ZLIB_COMP_SRCS
    ./external/zlib/deflate.c
    ./external/zlib/compress.c
    ./external/zlib/trees.c
)

set( SRCS
    ./src/npk.c
    ./src/npk_common.c
)

set( SRCS_DEV
    ./src/npk_dev.c
)

if( WIN32 )
    if( NOT CMAKE_CL_64 )
        add_definitions( -D_USE_32BIT_TIME_T )
    endif( NOT CMAKE_CL_64 )
    if( BUILD_SHARED_LIBS )
        add_definitions( -DNPK_DLL -DNPK_EXPORTS )
    endif( BUILD_SHARED_LIBS )
endif( WIN32 )

if( USE_ZLIB_PREFIX )
    add_definitions( -DZ_PREFIX )
endif( USE_ZLIB_PREFIX )

if( USE_NPK_PREFIX )
    add_definitions( -DNPK_PREFIX )
    add_definitions( -DNPK_PREFIX_NAME=${NPK_PREFIX} )
endif( USE_NPK_PREFIX )

if( CASE_SESITIVE )
    add_definitions( -DNPK_CASESENSITIVE )
endif( CASE_SESITIVE )

if( DEV_MODE )
    add_definitions( -DNPK_DEV )
    add_library( libnpk ${SRCS} ${SRCS_DEV} ${TEA_SRCS} ${ZLIB_COMP_SRCS} ${ZLIB_UNCOMP_SRCS} )
else( DEV_MODE )
    add_library( libnpk ${SRCS} ${TEA_SRCS} ${ZLIB_UNCOMP_SRCS} )
endif( DEV_MODE )

FILE(GLOB headerfiles "${CMAKE_CURRENT_SOURCE_DIR}/include/*.h")
install(FILES ${headerfiles} DESTINATION include)
install(TARGETS libnpk DESTINATION lib)

enable_testing()
add_subdirectory( tests )

{'fraction_non_alphanumeric': 0.12560975609756098, 'fraction_numerical': 0.00853658536585366, 'mean_word_length': 3.40994623655914, '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': '2186554', 'n_tokens_mistral': 1416, 'n_tokens_neox': 1388, 'n_words': 209}