<commit_before>IF(WIN32)
    SET(gtest_force_shared_crt ON CACHE BOOL "")
    SET(BUILD_SHARED_LIBS ON)
ENDIF()

# Only add the embedded gtest submodule if it isn't already present.
IF(NOT EXISTS ${gtest_SOURCE_DIR})
    ADD_SUBDIRECTORY(${SUBJSON_GTEST} subjson_gtest)
ENDIF(NOT EXISTS ${gtest_SOURCE_DIR})

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src)
INCLUDE_DIRECTORIES(${gtest_SOURCE_DIR} ${gtest_SOURCE_DIR}/include)

FILE(GLOB T_SUBJS_SRC t_*.cc)
ADD_EXECUTABLE(subjson-test ${T_SUBJS_SRC} subdoc-tests-common.cc)

TARGET_LINK_LIBRARIES(subjson-test subjson gtest gtest_main)
ADD_TEST(NAME subjson-all-tests COMMAND $<TARGET_FILE:subjson-test>)
<commit_msg>Drop complex target naming<commit_after>IF(WIN32)
    SET(gtest_force_shared_crt ON CACHE BOOL "")
    SET(BUILD_SHARED_LIBS ON)
ENDIF()

# Only add the embedded gtest submodule if it isn't already present.
IF(NOT EXISTS ${gtest_SOURCE_DIR})
    ADD_SUBDIRECTORY(${SUBJSON_GTEST} subjson_gtest)
ENDIF(NOT EXISTS ${gtest_SOURCE_DIR})

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src)
INCLUDE_DIRECTORIES(${gtest_SOURCE_DIR} ${gtest_SOURCE_DIR}/include)

FILE(GLOB T_SUBJS_SRC t_*.cc)
ADD_EXECUTABLE(subjson-test ${T_SUBJS_SRC} subdoc-tests-common.cc)

TARGET_LINK_LIBRARIES(subjson-test subjson gtest gtest_main)
ADD_TEST(NAME subjson-all-tests COMMAND subjson-test)

{'fraction_non_alphanumeric': 0.10364145658263306, 'fraction_numerical': 0.0028011204481792717, 'mean_word_length': 8.279220779220779, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '3908648', 'n_tokens_mistral': 573, 'n_tokens_neox': 538, 'n_words': 93}