From 56ae875861ab260b80a030f50c4aff9f9dc8fff0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 13:32:39 +0200 Subject: Adding upstream version 2.14.2. Signed-off-by: Daniel Baumann --- third-party/utf8cpp/tests/CMakeLists.txt | 43 ++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 third-party/utf8cpp/tests/CMakeLists.txt (limited to 'third-party/utf8cpp/tests/CMakeLists.txt') diff --git a/third-party/utf8cpp/tests/CMakeLists.txt b/third-party/utf8cpp/tests/CMakeLists.txt new file mode 100644 index 0000000..f3ce258 --- /dev/null +++ b/third-party/utf8cpp/tests/CMakeLists.txt @@ -0,0 +1,43 @@ +add_executable(negative ${PROJECT_SOURCE_DIR}/tests/negative.cpp) +add_executable(cpp11 ${PROJECT_SOURCE_DIR}/tests/test_cpp11.cpp) +add_executable(cpp17 ${PROJECT_SOURCE_DIR}/tests/test_cpp17.cpp) +add_executable(apitests ${PROJECT_SOURCE_DIR}/tests/apitests.cpp) + +add_executable(noexceptionstests ${PROJECT_SOURCE_DIR}/tests/noexceptionstests.cpp) + +target_link_libraries(negative PRIVATE utf8::cpp) +target_link_libraries(cpp11 PRIVATE utf8::cpp) +target_link_libraries(cpp17 PRIVATE utf8::cpp) +target_link_libraries(apitests PRIVATE utf8::cpp) +target_link_libraries(noexceptionstests PRIVATE utf8::cpp) + +target_compile_options(${PROJECT_NAME} INTERFACE + $<$:/W4> + $<$>:-Wall -Wextra -Wpedantic -Wconversion>) + +target_compile_options(noexceptionstests PUBLIC -fno-exceptions) + +set_target_properties(negative apitests noexceptionstests + PROPERTIES + CXX_STANDARD 98 + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS NO) + +set_target_properties(cpp11 + PROPERTIES + CXX_STANDARD 11 + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS NO) + +set_target_properties(cpp17 + PROPERTIES + CXX_STANDARD 17 + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS NO) + +add_test(negative_test negative ${PROJECT_SOURCE_DIR}/tests/test_data/utf8_invalid.txt) +add_test(cpp11_test cpp11) +add_test(cpp17_test cpp17) +add_test(api_test apitests) +add_test(noexceptions_test noexceptionstests) + -- cgit v1.2.3