diff options
author | Alexis Hildebrandt <afh@surryhill.net> | 2023-12-07 16:43:46 +0100 |
---|---|---|
committer | Alexis Hildebrandt <afh@surryhill.net> | 2023-12-10 19:01:27 +0100 |
commit | f017686dd4720bac373e8fcd5b779777a83162ec (patch) | |
tree | 408f1a27aa999bce0646f21c76330e3f252e1c76 /lib/utfcpp/v4/tests/CMakeLists.txt | |
parent | 3cfad2570d7fe8aa5d88de3797797d695d4fbe06 (diff) | |
download | fork-ledger-f017686dd4720bac373e8fcd5b779777a83162ec.tar.gz fork-ledger-f017686dd4720bac373e8fcd5b779777a83162ec.tar.bz2 fork-ledger-f017686dd4720bac373e8fcd5b779777a83162ec.zip |
utfcpp: Update to 4.0.4
Diffstat (limited to 'lib/utfcpp/v4/tests/CMakeLists.txt')
-rw-r--r-- | lib/utfcpp/v4/tests/CMakeLists.txt | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/lib/utfcpp/v4/tests/CMakeLists.txt b/lib/utfcpp/v4/tests/CMakeLists.txt new file mode 100644 index 00000000..8a00a6a0 --- /dev/null +++ b/lib/utfcpp/v4/tests/CMakeLists.txt @@ -0,0 +1,56 @@ +cmake_minimum_required (VERSION 3.5) +project(utfcpptests LANGUAGES CXX) +enable_testing() + +add_library(${PROJECT_NAME} INTERFACE) + +include_directories("${PROJECT_SOURCE_DIR}/../source") + +add_executable(negative negative.cpp) +add_executable(cpp11 test_cpp11.cpp) +add_executable(cpp17 test_cpp17.cpp) +add_executable(cpp20 test_cpp20.cpp) +add_executable(apitests apitests.cpp) + +add_executable(noexceptionstests noexceptionstests.cpp) + + + +target_compile_options(${PROJECT_NAME} INTERFACE + $<$<CXX_COMPILER_ID:MSVC>:/W4> + $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-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) + +set_target_properties(cpp20 + PROPERTIES + CXX_STANDARD 20 + CXX_STANDARD_REQUIRED YES + CXX_EXTENSIONS NO) + + +add_test(negative_test negative ${PROJECT_SOURCE_DIR}/test_data/utf8_invalid.txt) +add_test(cpp11_test cpp11) +add_test(cpp17_test cpp17) +add_test(cpp20_test cpp20) +add_test(api_test apitests) +add_test(noexceptions_test noexceptionstests) + |