From fb903c7180f37b5eace7bba0a8c46a075bbbcd3b Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Tue, 10 Jul 2018 21:06:20 -0600 Subject: [PATCH] Add support for user defined option BOOST_AUTO_LINK_SYSTEM This is to support auto linking when the libraries are built with system layout --- include/boost/config/auto_link.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/boost/config/auto_link.hpp b/include/boost/config/auto_link.hpp index 271f8379..f34353b5 100644 --- a/include/boost/config/auto_link.hpp +++ b/include/boost/config/auto_link.hpp @@ -28,6 +28,9 @@ BOOST_AUTO_LINK_NOMANGLE: Specifies that we should link to BOOST_LIB_NAME.lib, BOOST_AUTO_LINK_TAGGED: Specifies that we link to libraries built with the --layout=tagged option. This is essentially the same as the default name-mangled version, but without the compiler name and version, or the Boost version. Just the build options. +BOOST_AUTO_LINK_SYSTEM: Specifies that we link to libraries built with the --layout=system option. + This is essentially the same as the non-name-mangled version, but with + the prefix to differentiate static and dll builds These macros will be undef'ed at the end of the header, further this header has no include guards - so be sure to include it only once from your library! @@ -406,6 +409,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_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib") # endif +#elif defined(BOOST_AUTO_LINK_SYSTEM) +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") +# ifdef BOOST_LIB_DIAGNOSTIC +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") +# endif #elif defined(BOOST_AUTO_LINK_NOMANGLE) # pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") # ifdef BOOST_LIB_DIAGNOSTIC