diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2023-11-20 20:10:53 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2023-11-20 20:10:53 +0100 |
commit | 5fc8746a80a7bc6fe88845e1aae3a69903d21cdb (patch) | |
tree | e59de9241eef0f0ecb27038f7c85df6619309999 /test/CMakeLists.txt | |
parent | c9281d179754ffffe24ba9a718d2c4f2e1b4bd5e (diff) | |
parent | 35e13e4c9637f5bf7bef6039c8c813207780a174 (diff) |
Update upstream source from tag 'upstream/6.9.9'
Update to upstream version '6.9.9'
with Debian dir 5b0f8b561f5675106115901f41e387c12471c40a
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r-- | test/CMakeLists.txt | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 0000000..a508f6a --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,55 @@ +if(MSVC) + if(MSVC_VERSION LESS "1900") + # < VS2015, no "/utf-8" option, can not build test + return() + endif() +endif() + +enable_testing() + +add_executable(test_utf8 test_utf8.c) +target_link_libraries(test_utf8 onig) +if(MSVC) + target_compile_options(test_utf8 PRIVATE /utf-8) +endif(MSVC) + +add_executable(test_syntax test_syntax.c) +target_link_libraries(test_syntax onig) +if(MSVC) + target_compile_options(test_syntax PRIVATE /utf-8) +endif(MSVC) + +add_executable(test_options test_options.c) +target_link_libraries(test_options onig) +if(MSVC) + target_compile_options(test_options PRIVATE /utf-8) +endif(MSVC) + +if(NOT MSVC) + # EUC + add_executable(testc testc.c) + target_link_libraries(testc onig) + if (CMAKE_C_COMPILER_ID MATCHES "Clang|GNU") + target_compile_options(testc PRIVATE -Wall -Wno-invalid-source-encoding) + endif() +endif(NOT MSVC) + +if(ENABLE_POSIX_API) + add_executable(testp testp.c) + target_link_libraries(testp onig) +endif() + +add_executable(testcu testu.c) +target_link_libraries(testcu onig) + +add_executable(test_regset test_regset.c) +target_link_libraries(test_regset onig) +if(MSVC) + target_compile_options(test_regset PRIVATE /utf-8) +endif(MSVC) + +add_executable(test_back test_back.c) +target_link_libraries(test_back onig) +if(MSVC) + target_compile_options(test_back PRIVATE /utf-8) +endif(MSVC) |