diff options
author | Alexis Hildebrandt <afh@surryhill.net> | 2023-02-01 15:29:14 +0800 |
---|---|---|
committer | Martin Michlmayr <tbm@cyrius.com> | 2023-02-01 15:29:14 +0800 |
commit | dd2fde2aa87372189e2548ef556b50a0b8ee45f2 (patch) | |
tree | 8d8c4461b6b4ec0b7f617d1b2dc3f48766730242 /lib/utfcpp/v3/tests/CMakeLists.txt | |
parent | 782fdb71b4c6131927317c0de72f3b72a2d37258 (diff) | |
download | fork-ledger-dd2fde2aa87372189e2548ef556b50a0b8ee45f2.tar.gz fork-ledger-dd2fde2aa87372189e2548ef556b50a0b8ee45f2.tar.bz2 fork-ledger-dd2fde2aa87372189e2548ef556b50a0b8ee45f2.zip |
Updated lib/utfcpp
* Squashed 'lib/utfcpp/' content from commit 79835a5fa
git-subtree-dir: lib/utfcpp
git-subtree-split: 79835a5fa57271f07a90ed36123e30ae9741178e
* Change include path to utfcpp
Diffstat (limited to 'lib/utfcpp/v3/tests/CMakeLists.txt')
-rw-r--r-- | lib/utfcpp/v3/tests/CMakeLists.txt | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/lib/utfcpp/v3/tests/CMakeLists.txt b/lib/utfcpp/v3/tests/CMakeLists.txt new file mode 100644 index 00000000..f3ce2584 --- /dev/null +++ b/lib/utfcpp/v3/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 + $<$<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) + +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) + |