1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00
lokinet/test/CMakeLists.txt
Rick V 7788d6ec3c
fix windows
lto stuff remains for now
since native builds work

(cherry picked from commit 37814472af5e7c35d514bae16d19b08050765d52)

i'm not porting the UNIX-tier cppfs thing

(cherry picked from commit d6edbd789534d4fd0bce6c8c2418347cd80bebdb)

none of this had to be specified directly ffs

(cherry picked from commit 5dbefa7131a6fe0b2006c90ecdba7e466fdd1ecc)

stop breaking shit reee

(cherry picked from commit 14be89902ccc75a7fc21863593da393ca976d0d4)
2019-05-05 23:01:51 -05:00

71 lines
2.2 KiB
CMake

set(TEST_EXE testAll)
set(GTEST_DIR gtest)
add_subdirectory(${GTEST_DIR})
list(APPEND TEST_SRC
crypto/test_llarp_crypto_types.cpp
crypto/test_llarp_crypto.cpp
dht/test_llarp_dht_bucket.cpp
dht/test_llarp_dht_explorenetworkjob.cpp
dht/test_llarp_dht_kademlia.cpp
dht/test_llarp_dht_key.cpp
dht/test_llarp_dht_node.cpp
dht/test_llarp_dht_serviceaddresslookup.cpp
dht/test_llarp_dht_taglookup.cpp
dht/test_llarp_dht_tx.cpp
dht/test_llarp_dht_txowner.cpp
dns/test_llarp_dns_dns.cpp
ev/test_ev_loop.cpp
exit/test_llarp_exit_context.cpp
link/test_llarp_link.cpp
metrics/test_llarp_metrics_metricktank.cpp
metrics/test_llarp_metrics_publisher.cpp
net/test_llarp_net_inaddr.cpp
net/test_llarp_net.cpp
routing/llarp_routing_transfer_traffic.cpp
routing/test_llarp_routing_obtainexitmessage.cpp
service/test_llarp_service_address.cpp
service/test_llarp_service_identity.cpp
test_libabyss.cpp
test_llarp_dns.cpp
test_llarp_dnsd.cpp
test_llarp_encrypted_frame.cpp
test_llarp_router_contact.cpp
test_llarp_router.cpp
test_md5.cpp
util/test_llarp_util_aligned.cpp
util/test_llarp_util_bencode.cpp
util/test_llarp_util_bits.cpp
util/test_llarp_util_encode.cpp
util/test_llarp_util_ini.cpp
util/test_llarp_util_metrics_core.cpp
util/test_llarp_util_metrics_types.cpp
util/test_llarp_util_object.cpp
util/test_llarp_util_printer.cpp
util/test_llarp_util_queue_manager.cpp
util/test_llarp_util_queue.cpp
util/test_llarp_util_thread_pool.cpp
util/test_llarp_util_timerqueue.cpp
util/test_llarp_util_traits.cpp
util/test_llarp_utils_scheduler.cpp
)
add_executable(${TEST_EXE}
# helpers
main.cpp
crypto/mock_crypto.cpp
dht/mock_context.cpp
test_util.cpp
# actual test cases
${TEST_SRC}
)
target_link_libraries(${TEST_EXE} PUBLIC gmock gtest ${STATIC_LIB})
target_include_directories(${TEST_EXE} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
if(NOT WIN32)
target_link_libraries(${TEST_EXE} PUBLIC absl::variant)
else()
target_sources(${TEST_EXE} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/win32/test.rc")
target_link_libraries(${TEST_EXE} PUBLIC ${FS_LIB} ws2_32 iphlpapi shlwapi)
endif(NOT WIN32)