<commit_before>project(tests)

# For now, build the unittest lib manually
#
#  $ cd <project root dir>
#  $ git submodule init
#  $ cd externals/unittest-cpp
#  $ mkdir build
#  $ cd build
#  $ cmake ..
#  $ make

set(UNITTEST_CPP_PATH ${RESTC_ROOT_DIR}/externals/unittest-cpp)
set(UNITTEST_CPP_INCLUDE_PATH ${UNITTEST_CPP_PATH})
if (UNIX)
    set(UNITTEST_CPP_LIBPATH_DEBUG ${UNITTEST_CPP_PATH}/build)
	set(UNITTEST_CPP_LIBPATH_RELEASE ${UNITTEST_CPP_PATH}/build)
else()
    set(UNITTEST_CPP_LIBPATH_DEBUG ${UNITTEST_CPP_PATH}/build/Debug)
	set(UNITTEST_CPP_LIBPATH_RELEASE ${UNITTEST_CPP_PATH}/build/Release)
endif()

set (UNITTEST_LIB 
	debug ${UNITTEST_CPP_LIBPATH_DEBUG}/UnitTest++${CMAKE_STATIC_LIBRARY_SUFFIX}
	optimized ${UNITTEST_CPP_LIBPATH_RELEASE}/UnitTest++${CMAKE_STATIC_LIBRARY_SUFFIX}
	)

include_directories(${UNITTEST_CPP_INCLUDE_PATH})
link_directories(
    ${UNITTEST_CPP_LIBPATH}
    ${BOOST_LIBRARYDIR}
    )

add_executable(basic_tests BasicTests.cpp)
target_link_libraries(basic_tests
    restc-cpp ${DEFAULT_LIBRARIES})

add_test(BASIC_TESTS basic_tests)

add_executable(readme_tests ReadmeTests.cpp)
target_link_libraries(readme_tests
    restc-cpp
    ${DEFAULT_LIBRARIES}
)<commit_msg>Fixed problem with unittest lib linkage under Linux<commit_after>project(tests)

# For now, build the unittest lib manually
#
#  $ cd <project root dir>
#  $ git submodule init
#  $ cd externals/unittest-cpp
#  $ mkdir build
#  $ cd build
#  $ cmake ..
#  $ make

set(UNITTEST_CPP_PATH ${RESTC_ROOT_DIR}/externals/unittest-cpp)
set(UNITTEST_CPP_INCLUDE_PATH ${UNITTEST_CPP_PATH})
if (UNIX)
    set(UNITTEST_CPP_LIBPATH_DEBUG ${UNITTEST_CPP_PATH}/build)
	set(UNITTEST_CPP_LIBPATH_RELEASE ${UNITTEST_CPP_PATH}/build)
else()
    set(UNITTEST_CPP_LIBPATH_DEBUG ${UNITTEST_CPP_PATH}/build/Debug)
	set(UNITTEST_CPP_LIBPATH_RELEASE ${UNITTEST_CPP_PATH}/build/Release)
endif()

set (UNITTEST_LIB
    debug ${UNITTEST_CPP_LIBPATH_DEBUG}/${CMAKE_STATIC_LIBRARY_PREFIX}UnitTest++${CMAKE_STATIC_LIBRARY_SUFFIX}
    optimized ${UNITTEST_CPP_LIBPATH_RELEASE}/{CMAKE_STATIC_LIBRARY_PREFIX}UnitTest++${CMAKE_STATIC_LIBRARY_SUFFIX}
)

include_directories(${UNITTEST_CPP_INCLUDE_PATH})
link_directories(
    ${UNITTEST_CPP_LIBPATH}
    ${BOOST_LIBRARYDIR}
    )

add_executable(basic_tests BasicTests.cpp)
target_link_libraries(basic_tests
    restc-cpp ${DEFAULT_LIBRARIES})

add_test(BASIC_TESTS basic_tests)

add_executable(readme_tests ReadmeTests.cpp)
target_link_libraries(readme_tests
    restc-cpp
    ${DEFAULT_LIBRARIES}
)
{'fraction_non_alphanumeric': 0.10170162247724575, 'fraction_numerical': 0.0, 'mean_word_length': 7.050955414012739, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2057491', 'n_tokens_mistral': 996, 'n_tokens_neox': 932, 'n_words': 129}