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
|
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
|
lib libtorrent_test
|
||||||
: # sources
|
: # sources
|
||||||
setup_transfer.cpp
|
setup_transfer.cpp
|
||||||
@@ -33,13 +63,13 @@ lib libtorrent_test
|
|||||||
../ed25519/src/$(ED25519_SOURCES).c
|
../ed25519/src/$(ED25519_SOURCES).c
|
||||||
|
|
||||||
: # requirements
|
: # requirements
|
||||||
<library>/torrent//torrent/<link>shared/<boost-link>shared/<export-extra>on
|
|
||||||
# this is used to determine whether
|
# this is used to determine whether
|
||||||
# symbols are exported or imported
|
# symbols are exported or imported
|
||||||
<link>shared:<define>TORRENT_BUILDING_TEST_SHARED
|
<link>shared:<define>TORRENT_BUILDING_TEST_SHARED
|
||||||
<link>shared:<define>ED25519_BUILD_DLL
|
<link>shared:<define>ED25519_BUILD_DLL
|
||||||
<include>../ed25519/src
|
<include>../ed25519/src
|
||||||
<target-os>windows:<library>advapi32
|
<target-os>windows:<library>advapi32
|
||||||
|
<conditional>@link_libtorrent
|
||||||
|
|
||||||
: # default build
|
: # default build
|
||||||
<link>shared
|
<link>shared
|
||||||
@@ -53,12 +83,13 @@ lib advapi32 : : <name>Advapi32 ;
|
|||||||
project
|
project
|
||||||
: requirements
|
: requirements
|
||||||
<source>main.cpp
|
<source>main.cpp
|
||||||
<library>/torrent//torrent/<link>shared/<boost-link>shared/<export-extra>on
|
<conditional>@link_test
|
||||||
<library>libtorrent_test/<link>shared
|
<conditional>@link_libtorrent
|
||||||
: default-build
|
: default-build
|
||||||
<threading>multi
|
<threading>multi
|
||||||
<invariant-checks>full
|
<invariant-checks>full
|
||||||
<debug-iterators>on
|
<debug-iterators>on
|
||||||
|
<link>shared
|
||||||
;
|
;
|
||||||
|
|
||||||
feature launcher : none valgrind : composite ;
|
feature launcher : none valgrind : composite ;
|
||||||
|
Reference in New Issue
Block a user