<commit_before>
# Avoid macro definition collisions between ionc and googletest.
set(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -DGTEST_DONT_DEFINE_SUCCEED=1 -DGTEST_DONT_DEFINE_FAIL=1")
# Verbose parameterized names are disabled in debug configuration and on Windows. These don't
# always integrate well with IDEs (e.g. CLion), but are nice to have from the command line.
if (MSVC)
    # Prevent googletest from linking against different versions of the C Runtime Library on
    # Windows.
    set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
    # Prevent deprecation errors for std::tr1 in googletest
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING")
endif()

add_executable(all_tests
    gather_vectors.cpp
    ion_assert.cpp
    ion_test_util.cpp
    test_vectors.cpp
    test_ion_binary.cpp
    test_ion_writer.cpp
    test_ion_decimal.cpp
    test_ion_symbol.cpp
    test_ion_text.cpp
    test_ion_timestamp.cpp
    test_ion_values.cpp
    test_ion_extractor.cpp
    test_ion_cli.cpp
    test_ion_stream.cpp
    test_ion_reader_seek.cpp
)

add_subdirectory(googletest)


target_include_directories(all_tests
        PRIVATE
            .
            googletest/googletest/include/gtest
            ../tools/cli
            ../tools/events
            ../tools/events/inc
            ../ionc/
            ../ionc/include
)

# Linking against gtest_main provides a basic main() method, which detects all tests, for free.
target_link_libraries(all_tests ionc ion_events ion_cli gtest_main)<commit_msg>Removes `googletest` from all target. (#184)<commit_after>
# Avoid macro definition collisions between ionc and googletest.
set(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -DGTEST_DONT_DEFINE_SUCCEED=1 -DGTEST_DONT_DEFINE_FAIL=1")
# Verbose parameterized names are disabled in debug configuration and on Windows. These don't
# always integrate well with IDEs (e.g. CLion), but are nice to have from the command line.
if (MSVC)
    # Prevent googletest from linking against different versions of the C Runtime Library on
    # Windows.
    set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
    # Prevent deprecation errors for std::tr1 in googletest
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING")
endif()

add_executable(all_tests
    gather_vectors.cpp
    ion_assert.cpp
    ion_test_util.cpp
    test_vectors.cpp
    test_ion_binary.cpp
    test_ion_writer.cpp
    test_ion_decimal.cpp
    test_ion_symbol.cpp
    test_ion_text.cpp
    test_ion_timestamp.cpp
    test_ion_values.cpp
    test_ion_extractor.cpp
    test_ion_cli.cpp
    test_ion_stream.cpp
    test_ion_reader_seek.cpp
)

add_subdirectory(googletest EXCLUDE_FROM_ALL)


target_include_directories(all_tests
        PRIVATE
            .
            googletest/googletest/include/gtest
            ../tools/cli
            ../tools/events
            ../tools/events/inc
            ../ionc/
            ../ionc/include
)

# Linking against gtest_main provides a basic main() method, which detects all tests, for free.
target_link_libraries(all_tests ionc ion_events ion_cli gtest_main)
{'fraction_non_alphanumeric': 0.06704980842911877, 'fraction_numerical': 0.00351213282247765, 'mean_word_length': 3.3513888888888888, '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': '2182768', 'n_tokens_mistral': 1067, 'n_tokens_neox': 1011, 'n_words': 241}