2021-08-16 01:45:50 +00:00
|
|
|
add_executable(libtransmission-test
|
2021-12-14 20:59:40 +00:00
|
|
|
announce-list-test.cc
|
2022-01-25 04:25:55 +00:00
|
|
|
announcer-test.cc
|
2022-01-28 22:46:14 +00:00
|
|
|
benc-test.cc
|
2021-08-16 01:45:50 +00:00
|
|
|
bitfield-test.cc
|
2021-11-24 14:48:52 +00:00
|
|
|
block-info-test.cc
|
2021-08-16 01:45:50 +00:00
|
|
|
blocklist-test.cc
|
|
|
|
clients-test.cc
|
2021-11-25 18:26:51 +00:00
|
|
|
completion-test.cc
|
2021-08-16 01:45:50 +00:00
|
|
|
copy-test.cc
|
|
|
|
crypto-test-ref.h
|
|
|
|
crypto-test.cc
|
|
|
|
error-test.cc
|
2021-11-29 01:12:54 +00:00
|
|
|
file-piece-map-test.cc
|
2021-12-25 21:21:13 +00:00
|
|
|
file-test.cc
|
2021-08-16 01:45:50 +00:00
|
|
|
getopt-test.cc
|
|
|
|
history-test.cc
|
|
|
|
json-test.cc
|
2021-11-10 02:42:18 +00:00
|
|
|
magnet-metainfo-test.cc
|
2021-08-16 01:45:50 +00:00
|
|
|
makemeta-test.cc
|
|
|
|
move-test.cc
|
2022-04-29 02:35:47 +00:00
|
|
|
open-files-test.cc
|
2021-11-19 18:37:38 +00:00
|
|
|
peer-mgr-active-requests-test.cc
|
2021-11-24 14:48:52 +00:00
|
|
|
peer-mgr-wishlist-test.cc
|
|
|
|
peer-msgs-test.cc
|
2021-08-16 01:45:50 +00:00
|
|
|
quark-test.cc
|
2022-04-15 23:39:04 +00:00
|
|
|
remove-test.cc
|
2021-08-16 01:45:50 +00:00
|
|
|
rename-test.cc
|
|
|
|
rpc-test.cc
|
|
|
|
session-test.cc
|
2022-03-24 21:41:29 +00:00
|
|
|
strbuf-test.cc
|
2021-08-16 01:45:50 +00:00
|
|
|
subprocess-test-script.cmd
|
|
|
|
subprocess-test.cc
|
|
|
|
test-fixtures.h
|
2022-05-23 22:53:26 +00:00
|
|
|
torrent-files-test.cc
|
2021-12-25 21:21:13 +00:00
|
|
|
torrent-metainfo-test.cc
|
2022-03-01 23:06:29 +00:00
|
|
|
torrents-test.cc
|
2021-08-16 01:45:50 +00:00
|
|
|
utils-test.cc
|
|
|
|
variant-test.cc
|
2021-11-09 03:30:03 +00:00
|
|
|
watchdir-test.cc
|
|
|
|
web-utils-test.cc)
|
2021-08-16 01:45:50 +00:00
|
|
|
|
|
|
|
target_compile_definitions(libtransmission-test
|
|
|
|
PRIVATE
|
2021-10-15 18:13:33 +00:00
|
|
|
-DLIBTRANSMISSION_TEST_ASSETS_DIR="${CMAKE_CURRENT_SOURCE_DIR}/assets"
|
2021-08-16 01:45:50 +00:00
|
|
|
__TRANSMISSION__)
|
|
|
|
|
|
|
|
target_include_directories(libtransmission-test
|
|
|
|
PRIVATE
|
|
|
|
${CMAKE_SOURCE_DIR}/libtransmission
|
|
|
|
${CMAKE_BINARY_DIR}/libtransmission)
|
|
|
|
|
|
|
|
target_include_directories(libtransmission-test SYSTEM
|
|
|
|
PRIVATE
|
|
|
|
${CURL_INCLUDE_DIRS}
|
|
|
|
${EVENT2_INCLUDE_DIRS})
|
|
|
|
|
|
|
|
target_compile_options(libtransmission-test
|
|
|
|
PRIVATE
|
|
|
|
${CXX_WARNING_FLAGS}
|
|
|
|
$<$<OR:$<CXX_COMPILER_ID:GNU>,$<CXX_COMPILER_ID:Clang>>:-Wno-sign-compare>) # patches welcomed
|
|
|
|
|
|
|
|
target_link_libraries(libtransmission-test
|
|
|
|
PRIVATE
|
|
|
|
${TR_NAME}
|
|
|
|
gtestall)
|
|
|
|
|
|
|
|
add_test(
|
|
|
|
NAME libtransmission-test
|
|
|
|
COMMAND libtransmission-test)
|
2020-08-11 18:11:55 +00:00
|
|
|
|
|
|
|
add_custom_command(
|
2021-08-16 01:45:50 +00:00
|
|
|
TARGET libtransmission-test
|
|
|
|
PRE_BUILD
|
|
|
|
COMMAND
|
|
|
|
${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/subprocess-test-script.cmd
|
|
|
|
$<TARGET_FILE_DIR:libtransmission-test>/subprocess-test.cmd)
|
|
|
|
|
|
|
|
add_executable(subprocess-test
|
|
|
|
subprocess-test-program.cc)
|
|
|
|
|
|
|
|
target_include_directories(subprocess-test
|
|
|
|
PRIVATE
|
|
|
|
${CMAKE_SOURCE_DIR}/libtransmission)
|
|
|
|
|
|
|
|
target_link_libraries(subprocess-test
|
|
|
|
PRIVATE
|
|
|
|
${TR_NAME})
|
|
|
|
|
|
|
|
add_dependencies(libtransmission-test
|
|
|
|
subprocess-test)
|