<commit_before># <NAME> <<EMAIL>> HKUST.
# All rights reserved.

# Where Google Test's .h files can be found.
include_directories(${gtest_SOURCE_DIR}/include)

set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

# set output built test executables back to RUNTIME_OUTPUT_DIRECTORY,
# which is different from src, so that add_test can find them
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${RUNTIME_OUTPUT_DIRECTORY})

set(TEST_SOURCES
unit_test.cpp 
../src/image_graph/image_graph.cpp 
../src/utils/data_structures.cpp
../src/vocab_tree/vot_pipeline.cpp
../src/vocab_tree/clustering.cpp
../src/utils/global_params.cpp
../src/utils/io_utils.cpp
../src/vocab_tree/vocab_tree.cpp)

# compile options for unit test (need c++11)
add_executable(unit_test ${TEST_SOURCES})
set_property(TARGET unit_test PROPERTY CXX_STANDARD 11)
set_property(TARGET unit_test PROPERTY CXX_STANDARD_REQUIRED ON)
target_link_libraries(unit_test Threads::Threads)		# this will fail on travis-CI
target_link_libraries(unit_test ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(unit_test gtest_main)

add_test(unit_test unit_test)<commit_msg>fix cmake error<commit_after># <NAME> <<EMAIL>> HKUST.
# All rights reserved.

# Where Google Test's .h files can be found.
include_directories(${gtest_SOURCE_DIR}/include)

set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

# set output built test executables back to RUNTIME_OUTPUT_DIRECTORY,
# which is different from src, so that add_test can find them
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${RUNTIME_OUTPUT_DIRECTORY})

set(TEST_SOURCES
unit_test.cpp 
../src/image_graph/image_graph.cpp 
../src/utils/data_structures.cpp
../src/vocab_tree/vot_pipeline.cpp
../src/vocab_tree/clustering.cpp
../src/utils/global_params.cpp
../src/utils/io_utils.cpp
../src/vocab_tree/vocab_tree.cpp)

# compile options for unit test (need c++11)
add_executable(unit_test ${TEST_SOURCES})
set_property(TARGET unit_test PROPERTY CXX_STANDARD 11)
set_property(TARGET unit_test PROPERTY CXX_STANDARD_REQUIRED ON)
#target_link_libraries(unit_test Threads::Threads)		# this will fail on travis-CI
target_link_libraries(unit_test ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(unit_test gtest_main)

add_test(unit_test unit_test)
{'fraction_non_alphanumeric': 0.09852875613018279, 'fraction_numerical': 0.0035666518056174765, 'mean_word_length': 6.658703071672355, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '767118', 'n_tokens_mistral': 831, 'n_tokens_neox': 799, 'n_words': 165}