forked from boostorg/config
Apply patch from https://svn.boost.org/trac/boost/ticket/5315.
Allows auto-linking code to synch up with Boost.Build with the --buildid option.
This commit is contained in:
@ -271,6 +271,12 @@ feature off.
|
||||
Causes the auto-linking code to output diagnostic messages indicating the
|
||||
name of the library that is selected for linking.
|
||||
]]
|
||||
[[`BOOST_LIB_BUILDID`][
|
||||
If you built Boost using the `--buildid` option then set this macro to the same value
|
||||
as you passed to bjam. For example if you built using `bjam address-model=64 --buildid=amd64`
|
||||
then compile your code with `-DBOOST_LIB_BUILDID=amd64` to ensure the correct libraries
|
||||
are selected at link time.
|
||||
]]
|
||||
[[`BOOST_LIB_TOOLSET`][
|
||||
Overrides the name of the toolset part of the name of library being linked
|
||||
to; note if defined this must be defined to a quoted string literal, for
|
||||
|
@ -680,6 +680,22 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">BOOST_LIB_BUILDID</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
If you built Boost using the <code class="computeroutput"><span class="special">--</span><span class="identifier">buildid</span></code> option then set this
|
||||
macro to the same value as you passed to bjam. For example if you
|
||||
built using <code class="computeroutput"><span class="identifier">bjam</span> <span class="identifier">address</span><span class="special">-</span><span class="identifier">model</span><span class="special">=</span><span class="number">64</span> <span class="special">--</span><span class="identifier">buildid</span><span class="special">=</span><span class="identifier">amd64</span></code> then compile your code
|
||||
with <code class="computeroutput"><span class="special">-</span><span class="identifier">DBOOST_LIB_BUILDID</span><span class="special">=</span><span class="identifier">amd64</span></code>
|
||||
to ensure the correct libraries are selected at link time.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">BOOST_LIB_TOOLSET</span></code>
|
||||
@ -968,7 +984,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"><p><small>Last revised: August 25, 2014 at 17:53:11 GMT</small></p></td>
|
||||
<td align="left"><p><small>Last revised: October 02, 2014 at 17:20:14 GMT</small></p></td>
|
||||
<td align="right"><div class="copyright-footer"></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
@ -387,6 +387,11 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
|
||||
# ifdef BOOST_LIB_DIAGNOSTIC
|
||||
# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
|
||||
# endif
|
||||
#elif defined(BOOST_LIB_BUILDID)
|
||||
# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib")
|
||||
# ifdef BOOST_LIB_DIAGNOSTIC
|
||||
# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib")
|
||||
# endif
|
||||
#else
|
||||
# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib")
|
||||
# ifdef BOOST_LIB_DIAGNOSTIC
|
||||
|
@ -119,5 +119,15 @@
|
||||
// that feature off.
|
||||
// #define BOOST_WHATEVER_NO_LIB
|
||||
|
||||
|
||||
// BOOST_LIB_BUILDID: Set to the same value as the value passed to Boost.Build's
|
||||
// --buildid command line option. For example if you built using:
|
||||
//
|
||||
// bjam address-model=64 --buildid=amd64
|
||||
//
|
||||
// then compile your code with:
|
||||
//
|
||||
// -DBOOST_LIB_BUILDID = amd64
|
||||
//
|
||||
// to ensure the correct libraries are selected at link time.
|
||||
// #define BOOST_LIB_BUILDID amd64
|
||||
|
||||
|
@ -73,10 +73,10 @@ autolink-lib link_test : ../link_test.cpp
|
||||
explicit link_test ;
|
||||
|
||||
run ../main.cpp link_test
|
||||
: : : <toolset>msvc-8.0:<build>no <toolset>msvc-9.0:<build>no <toolset>msvc-10.0:<build>no <link>static <runtime-link>static <threading>single debug : link_test_ssd ;
|
||||
: : : <toolset>msvc-8.0:<build>no <toolset>msvc-9.0:<build>no <toolset>msvc-10.0:<build>no <toolset>msvc-11.0:<build>no <toolset>msvc-12.0:<build>no <link>static <runtime-link>static <threading>single debug : link_test_ssd ;
|
||||
|
||||
run ../main.cpp link_test
|
||||
: : : <toolset>msvc-8.0:<build>no <toolset>msvc-9.0:<build>no <toolset>msvc-10.0:<build>no <link>static <runtime-link>static <threading>single release : link_test_ssr ;
|
||||
: : : <toolset>msvc-8.0:<build>no <toolset>msvc-9.0:<build>no <toolset>msvc-10.0:<build>no <toolset>msvc-11.0:<build>no <toolset>msvc-12.0:<build>no <link>static <runtime-link>static <threading>single release : link_test_ssr ;
|
||||
|
||||
run ../main.cpp link_test
|
||||
: : : <link>static <runtime-link>static <threading>multi debug : link_test_smd ;
|
||||
|
Reference in New Issue
Block a user