diff --git a/test/Jamfile b/test/Jamfile index d397646d2..082f266bc 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -7,9 +7,29 @@ exe test_natpmp : test_natpmp.cpp /torrent//torrent explicit test_natpmp ; +rule libtorrent_dependency ( properties * ) +{ + local result ; + + if msvc in $(properties) + { + # for some reason, the visual studio debugger seems + # to get very confused with the dynamic linking. + # since debugging unit tests is common, just link + # statically with msvc + result += /torrent//torrent/static/static/on ; + } + else + { + result += /torrent//torrent/shared/shared/on ; + } + + return $(result) ; +} + project : requirements - /torrent//torrent/shared/shared/on + @libtorrent_dependency main.cpp setup_transfer.cpp : default-build