2017-05-10 19:47:24 +00:00
|
|
|
project(tawashi_unittest CXX C)
|
|
|
|
|
|
|
|
find_package(GLIB 2.20 REQUIRED)
|
2017-05-04 22:03:53 +00:00
|
|
|
|
2017-05-05 08:48:46 +00:00
|
|
|
set(CMAKE_CXX_STANDARD 14)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
|
2017-05-10 19:47:24 +00:00
|
|
|
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wpedantic -Wconversion -Werror")
|
|
|
|
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_DEBUG} -Wall -Wpedantic -Wconversion -Werror")
|
|
|
|
|
2017-05-04 22:03:53 +00:00
|
|
|
add_executable(${PROJECT_NAME}
|
|
|
|
check.cpp
|
2017-05-06 01:01:05 +00:00
|
|
|
test_ini_file.cpp
|
2017-05-05 08:48:46 +00:00
|
|
|
test_settings_bag.cpp
|
2017-05-10 19:47:24 +00:00
|
|
|
test_invalid_utf8_post.cpp
|
|
|
|
../data/UTF-8-test.txt.c
|
2017-05-19 18:43:58 +00:00
|
|
|
test_invalid_utf8_get.cpp
|
2017-05-24 23:51:26 +00:00
|
|
|
test_mime_split.cpp
|
2017-06-19 17:08:34 +00:00
|
|
|
test_html_escape.cpp
|
2017-05-04 22:03:53 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
target_include_directories(${PROJECT_NAME}
|
|
|
|
PRIVATE ${TAWASHI_SOURCE_ROOT}/lib/Catch/single_include
|
2017-05-06 20:49:46 +00:00
|
|
|
PRIVATE ${TAWASHI_GEN_INCLUDE_DIR}
|
2017-05-10 19:47:24 +00:00
|
|
|
PRIVATE ${GLIB_INCLUDE_DIRS}
|
2017-05-04 22:03:53 +00:00
|
|
|
)
|
|
|
|
target_link_libraries(${PROJECT_NAME}
|
2017-06-03 20:16:23 +00:00
|
|
|
PRIVATE tawashi
|
2017-05-06 20:49:46 +00:00
|
|
|
PRIVATE duckhandy
|
2017-06-12 09:32:20 +00:00
|
|
|
PRIVATE kamokan_impl
|
2017-05-10 19:47:24 +00:00
|
|
|
PRIVATE ${GLIB_LIBRARIES}
|
2017-05-04 22:03:53 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
add_test(
|
|
|
|
NAME TawashiUnitTest
|
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
COMMAND ${PROJECT_NAME}
|
|
|
|
)
|