<commit_before>cmake_minimum_required(VERSION 3.0.0)
project("Lily")

if(MSVC)
    add_definitions(/W4)
    add_definitions(/wd4201)
    add_definitions(/wd4204)
    add_definitions(/wd4214)
    add_definitions(/MP)
else()
    if(DEBUG)
        set(CMAKE_C_FLAGS      "${CMAKE_C_FLAGS} -g3")
    endif(DEBUG)

    if(NOT QUICK_BUILD)
        set(CMAKE_C_FLAGS      "${CMAKE_C_FLAGS} -O2")
    endif(NOT QUICK_BUILD)

    set(CMAKE_C_FLAGS          "${CMAKE_C_FLAGS} -Wall")
endif()

set(LIBRARY_OUTPUT_PATH    "${PROJECT_BINARY_DIR}/lib")
set(EXECUTABLE_OUTPUT_PATH "${PROJECT_BINARY_DIR}")

set(LILY_MAJOR             "1")
set(LILY_MINOR             "0")

add_definitions(-DLILY_VERSION_DIR="${LILY_MAJOR}_${LILY_MINOR}")

# BSD libc includes the dl* functions and there's no libdl on them.
# Unfortunately, CMake doesn't seem to distinguish *BSD from the other *nixen.
STRING(REGEX MATCH "BSD" IS_BSD ${CMAKE_SYSTEM_NAME})

if(IS_BSD OR MINGW OR MSVC)
    set(LILY_NEED_DL 0)
else()
    set(LILY_NEED_DL 1)
endif()

add_subdirectory(src)
add_subdirectory(run)

if(WITH_SANDBOX)
    add_subdirectory(sandbox)
endif(WITH_SANDBOX)
<commit_msg>add check target, skip CXX tests<commit_after>cmake_minimum_required(VERSION 3.0.0)
project("Lily" C)

if(MSVC)
    add_definitions(/W4)
    add_definitions(/wd4201)
    add_definitions(/wd4204)
    add_definitions(/wd4214)
    add_definitions(/MP)
    set(CMAKE_CTEST_COMMAND	copy lily.exe ..)
else()
    set(CMAKE_CTEST_COMMAND	cp lily ..)
    if(DEBUG)
        set(CMAKE_C_FLAGS      "${CMAKE_C_FLAGS} -g3")
    endif(DEBUG)

    if(NOT QUICK_BUILD)
        set(CMAKE_C_FLAGS      "${CMAKE_C_FLAGS} -O2")
    endif(NOT QUICK_BUILD)

    set(CMAKE_C_FLAGS          "${CMAKE_C_FLAGS} -Wall")
endif()

set(LIBRARY_OUTPUT_PATH    "${PROJECT_BINARY_DIR}/lib")
set(EXECUTABLE_OUTPUT_PATH "${PROJECT_BINARY_DIR}")

set(LILY_MAJOR             "1")
set(LILY_MINOR             "0")

add_definitions(-DLILY_VERSION_DIR="${LILY_MAJOR}_${LILY_MINOR}")

# BSD libc includes the dl* functions and there's no libdl on them.
# Unfortunately, CMake doesn't seem to distinguish *BSD from the other *nixen.
STRING(REGEX MATCH "BSD" IS_BSD ${CMAKE_SYSTEM_NAME})

if(IS_BSD OR MINGW OR MSVC)
    set(LILY_NEED_DL 0)
else()
    set(LILY_NEED_DL 1)
endif()

add_subdirectory(src)
add_subdirectory(run)

if(WITH_SANDBOX)
    add_subdirectory(sandbox)
endif(WITH_SANDBOX)

set(TEST_COMMAND cd .. && python pre-commit-hook.py --verbose)
add_custom_target(check ${CMAKE_CTEST_COMMAND}
  COMMAND ${TEST_COMMAND}
  DEPENDS lily VERBATIM)

{'fraction_non_alphanumeric': 0.11790050920485703, 'fraction_numerical': 0.017234625930278104, 'mean_word_length': 4.191056910569106, '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': '3895149', 'n_tokens_mistral': 1082, 'n_tokens_neox': 1005, 'n_words': 182}