<commit_before>cmake_minimum_required(VERSION 2.8)
project(animal)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")

set(ANIMAL_SRC
    src/animal.c
    src/btree.c
    src/db.c
    src/util.c)

set(ANIMAL_TEST_SRC
    tests/test_run.cc
    tests/btree_test.cc
    tests/animal_test.cc
    tests/game_test.cc
    tests/sql_test.cc)

## find sqlite3
find_library(SQLITE sqlite3)
if (${SQLITE} STREQUAL SQLITE-NOTFOUND)
    # if not found, set no sql compiler flag
    set(CMAKE_C_FLAGS -DSLS_NO_SQL)
    set(CMAKE_CXX_FLAGS -DSLS_NO_SQL)
endif (${SQLITE} STREQUAL SQLITE-NOTFOUND)

add_subdirectory(extern/googletest)
include_directories(
    ${CMAKE_SOURCE_DIR}/extern/googletest/include 
    ${CMAKE_SOURCE_DIR}/include)

add_library(
    animal
    ${ANIMAL_SRC})

add_executable(
    animal_main
    src/main.c)
target_link_libraries(
    animal_main
    animal
    ${SQLITE})

add_executable(
    animal_tests
    ${ANIMAL_TEST_SRC})
target_link_libraries(
    animal_tests
    animal
    gtest
    gtest_main
    ${SQLITE})<commit_msg>made no-database branch<commit_after>cmake_minimum_required(VERSION 2.8)
project(animal)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")

set(ANIMAL_SRC
    src/animal.c
    src/btree.c
    src/util.c)

set(ANIMAL_TEST_SRC
    tests/test_run.cc
    tests/btree_test.cc
    tests/animal_test.cc
    tests/game_test.cc)

add_subdirectory(extern/googletest)
include_directories(
    ${CMAKE_SOURCE_DIR}/extern/googletest/include
    ${CMAKE_SOURCE_DIR}/include)

add_library(
    animal
    ${ANIMAL_SRC})

add_executable(
    animal_main
    src/main.c)
target_link_libraries(
    animal_main
    animal)

add_executable(
    animal_tests
    ${ANIMAL_TEST_SRC})
target_link_libraries(
    animal_tests
    animal
    gtest
    gtest_main)
{'fraction_non_alphanumeric': 0.10159574468085106, 'fraction_numerical': 0.005319148936170213, 'mean_word_length': 3.9761904761904763, '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': '2794083', 'n_tokens_mistral': 783, 'n_tokens_neox': 736, 'n_words': 107}