make tests buildable both as shared and static linkage. static builds make it easier to debug
This commit is contained in:
37
test/Jamfile
37
test/Jamfile
@@ -25,6 +25,36 @@ ED25519_SOURCES =
|
||||
verify
|
||||
;
|
||||
|
||||
rule link_test ( properties * )
|
||||
{
|
||||
local result ;
|
||||
if <link>shared in $(properties)
|
||||
{
|
||||
result +=
|
||||
<library>libtorrent_test/<link>shared ;
|
||||
}
|
||||
else
|
||||
{
|
||||
result +=
|
||||
<library>libtorrent_test/<link>static ;
|
||||
}
|
||||
}
|
||||
|
||||
rule link_libtorrent ( properties * )
|
||||
{
|
||||
local result ;
|
||||
if <link>shared in $(properties)
|
||||
{
|
||||
result +=
|
||||
<library>/torrent//torrent/<link>shared/<boost-link>shared/<export-extra>on ;
|
||||
}
|
||||
else
|
||||
{
|
||||
result +=
|
||||
<library>/torrent//torrent/<link>static/<boost-link>static/<export-extra>on ;
|
||||
}
|
||||
}
|
||||
|
||||
lib libtorrent_test
|
||||
: # sources
|
||||
setup_transfer.cpp
|
||||
@@ -33,13 +63,13 @@ lib libtorrent_test
|
||||
../ed25519/src/$(ED25519_SOURCES).c
|
||||
|
||||
: # requirements
|
||||
<library>/torrent//torrent/<link>shared/<boost-link>shared/<export-extra>on
|
||||
# this is used to determine whether
|
||||
# symbols are exported or imported
|
||||
<link>shared:<define>TORRENT_BUILDING_TEST_SHARED
|
||||
<link>shared:<define>ED25519_BUILD_DLL
|
||||
<include>../ed25519/src
|
||||
<target-os>windows:<library>advapi32
|
||||
<conditional>@link_libtorrent
|
||||
|
||||
: # default build
|
||||
<link>shared
|
||||
@@ -53,12 +83,13 @@ lib advapi32 : : <name>Advapi32 ;
|
||||
project
|
||||
: requirements
|
||||
<source>main.cpp
|
||||
<library>/torrent//torrent/<link>shared/<boost-link>shared/<export-extra>on
|
||||
<library>libtorrent_test/<link>shared
|
||||
<conditional>@link_test
|
||||
<conditional>@link_libtorrent
|
||||
: default-build
|
||||
<threading>multi
|
||||
<invariant-checks>full
|
||||
<debug-iterators>on
|
||||
<link>shared
|
||||
;
|
||||
|
||||
feature launcher : none valgrind : composite ;
|
||||
|
Reference in New Issue
Block a user