extend link compatibility check to export-extra configurations (#876)
extend link compatibility check to export-extra configurations
This commit is contained in:
parent
777a0838ce
commit
33117ce5b2
16
Jamfile
16
Jamfile
|
@ -308,15 +308,6 @@ rule building ( properties * )
|
||||||
{
|
{
|
||||||
local result ;
|
local result ;
|
||||||
|
|
||||||
if <link>shared in $(properties) && <export-extra>on in $(properties)
|
|
||||||
{
|
|
||||||
# export some internal libtorrent functions
|
|
||||||
# in order to me able to unit test them.
|
|
||||||
# this is off by default to keep the export
|
|
||||||
# symbol table reasonably small
|
|
||||||
result += <define>TORRENT_EXPORT_EXTRA ;
|
|
||||||
}
|
|
||||||
|
|
||||||
if <toolset>msvc in $(properties)
|
if <toolset>msvc in $(properties)
|
||||||
{
|
{
|
||||||
# allow larger .obj files (with more sections)
|
# allow larger .obj files (with more sections)
|
||||||
|
@ -503,6 +494,11 @@ feature.compose <profile-calls>on : <define>TORRENT_PROFILE_CALLS=1 ;
|
||||||
# controls whether or not to export some internal
|
# controls whether or not to export some internal
|
||||||
# libtorrent functions. Used for unit testing
|
# libtorrent functions. Used for unit testing
|
||||||
feature export-extra : off on : composite propagated ;
|
feature export-extra : off on : composite propagated ;
|
||||||
|
# export some internal libtorrent functions
|
||||||
|
# in order to me able to unit test them.
|
||||||
|
# this is off by default to keep the export
|
||||||
|
# symbol table reasonably small
|
||||||
|
feature.compose <export-extra>on : <define>TORRENT_EXPORT_EXTRA ;
|
||||||
|
|
||||||
|
|
||||||
# this is a trick to get filename paths to targets to become shorter
|
# this is a trick to get filename paths to targets to become shorter
|
||||||
|
@ -741,7 +737,6 @@ local usage-requirements =
|
||||||
# disable bogus deprecation warnings on msvc8
|
# disable bogus deprecation warnings on msvc8
|
||||||
<toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
|
<toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
|
||||||
<toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
|
<toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
|
||||||
<logging>off:<define>TORRENT_DISABLE_LOGGING
|
|
||||||
|
|
||||||
<cxxflags>$(CXXFLAGS)
|
<cxxflags>$(CXXFLAGS)
|
||||||
<linkflags>$(LDFLAGS)
|
<linkflags>$(LDFLAGS)
|
||||||
|
@ -781,6 +776,7 @@ lib torrent
|
||||||
: # usage requirements
|
: # usage requirements
|
||||||
$(usage-requirements)
|
$(usage-requirements)
|
||||||
<link>shared:<define>TORRENT_LINKING_SHARED
|
<link>shared:<define>TORRENT_LINKING_SHARED
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
headers = [ path.glob-tree include/libtorrent : *.hpp ] ;
|
headers = [ path.glob-tree include/libtorrent : *.hpp ] ;
|
||||||
|
|
|
@ -51,7 +51,7 @@ namespace libtorrent { namespace aux
|
||||||
|
|
||||||
struct TORRENT_EXTRA_EXPORT session_settings
|
struct TORRENT_EXTRA_EXPORT session_settings
|
||||||
{
|
{
|
||||||
friend void libtorrent::save_settings_to_dict(
|
friend TORRENT_EXTRA_EXPORT void libtorrent::save_settings_to_dict(
|
||||||
aux::session_settings const& s, entry::dictionary_type& sett);
|
aux::session_settings const& s, entry::dictionary_type& sett);
|
||||||
|
|
||||||
void set_str(int name, std::string const& value)
|
void set_str(int name, std::string const& value)
|
||||||
|
|
|
@ -53,9 +53,20 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
#define TORRENT_CFG_DEPR deprecated_
|
#define TORRENT_CFG_DEPR deprecated_
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined TORRENT_EXPORT_EXTRA
|
||||||
|
#if TORRENT_USE_ASSERTS
|
||||||
|
#define TORRENT_CFG_ASSERTS asserts_
|
||||||
|
#else
|
||||||
|
#define TORRENT_CFG_ASSERTS noasserts_
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#define TORRENT_CFG_ASSERTS
|
||||||
|
#endif
|
||||||
|
|
||||||
#define TORRENT_CFG \
|
#define TORRENT_CFG \
|
||||||
BOOST_PP_CAT(TORRENT_CFG_IPV6, \
|
BOOST_PP_CAT(TORRENT_CFG_IPV6, \
|
||||||
TORRENT_CFG_DEPR)
|
BOOST_PP_CAT(TORRENT_CFG_DEPR, \
|
||||||
|
TORRENT_CFG_ASSERTS))
|
||||||
|
|
||||||
#define TORRENT_CFG_STRING BOOST_PP_STRINGIZE(TORRENT_CFG)
|
#define TORRENT_CFG_STRING BOOST_PP_STRINGIZE(TORRENT_CFG)
|
||||||
|
|
||||||
|
|
|
@ -176,7 +176,7 @@ namespace libtorrent
|
||||||
namespace libtorrent
|
namespace libtorrent
|
||||||
{
|
{
|
||||||
#if TORRENT_USE_ASSERTS
|
#if TORRENT_USE_ASSERTS
|
||||||
struct single_threaded
|
struct TORRENT_EXTRA_EXPORT single_threaded
|
||||||
{
|
{
|
||||||
single_threaded(): m_id() {}
|
single_threaded(): m_id() {}
|
||||||
~single_threaded() { m_id = std::thread::id(); }
|
~single_threaded() { m_id = std::thread::id(); }
|
||||||
|
|
|
@ -83,7 +83,7 @@ namespace libtorrent
|
||||||
//
|
//
|
||||||
struct TORRENT_EXPORT settings_pack
|
struct TORRENT_EXPORT settings_pack
|
||||||
{
|
{
|
||||||
friend void apply_pack(settings_pack const* pack, aux::session_settings& sett, aux::session_impl* ses);
|
friend TORRENT_EXTRA_EXPORT void apply_pack(settings_pack const* pack, aux::session_settings& sett, aux::session_impl* ses);
|
||||||
|
|
||||||
void set_str(int name, std::string val);
|
void set_str(int name, std::string val);
|
||||||
void set_int(int name, int val);
|
void set_int(int name, int val);
|
||||||
|
|
|
@ -69,7 +69,7 @@ namespace libtorrent
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
//#error boost::enable_if< is_base<T, tailqueue_node<T> > >
|
//#error boost::enable_if< is_base<T, tailqueue_node<T> > >
|
||||||
struct TORRENT_EXTRA_EXPORT tailqueue
|
struct tailqueue
|
||||||
{
|
{
|
||||||
tailqueue(): m_first(nullptr), m_last(nullptr), m_size(0) {}
|
tailqueue(): m_first(nullptr), m_last(nullptr), m_size(0) {}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,8 @@ use-project /libsimulator : libsimulator ;
|
||||||
project
|
project
|
||||||
: requirements
|
: requirements
|
||||||
<simulator>on
|
<simulator>on
|
||||||
<library>/torrent//torrent/<export-extra>on
|
<export-extra>on
|
||||||
|
<library>/torrent//torrent
|
||||||
<library>/libtorrent_test//libtorrent_test
|
<library>/libtorrent_test//libtorrent_test
|
||||||
<source>setup_swarm.cpp
|
<source>setup_swarm.cpp
|
||||||
<source>setup_dht.cpp
|
<source>setup_dht.cpp
|
||||||
|
|
|
@ -44,12 +44,12 @@ rule link_libtorrent ( properties * )
|
||||||
if <link>shared in $(properties)
|
if <link>shared in $(properties)
|
||||||
{
|
{
|
||||||
result +=
|
result +=
|
||||||
<library>/torrent//torrent/<link>shared/<boost-link>shared/<export-extra>on ;
|
<library>/torrent//torrent/<link>shared/<boost-link>shared ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
result +=
|
result +=
|
||||||
<library>/torrent//torrent/<link>static/<boost-link>static/<export-extra>on ;
|
<library>/torrent//torrent/<link>static/<boost-link>static ;
|
||||||
}
|
}
|
||||||
return $(result) ;
|
return $(result) ;
|
||||||
}
|
}
|
||||||
|
@ -102,6 +102,7 @@ project
|
||||||
# disable warning C4275: non DLL-interface classkey 'identifier' used as base for DLL-interface classkey 'identifier'
|
# disable warning C4275: non DLL-interface classkey 'identifier' used as base for DLL-interface classkey 'identifier'
|
||||||
<toolset>msvc:<cflags>/wd4275
|
<toolset>msvc:<cflags>/wd4275
|
||||||
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
|
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
|
||||||
|
<export-extra>on
|
||||||
: default-build
|
: default-build
|
||||||
<threading>multi
|
<threading>multi
|
||||||
<asserts>on
|
<asserts>on
|
||||||
|
|
Loading…
Reference in New Issue