|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r77997 - in trunk: boost/filesystem boost/system libs/filesystem/build libs/system/test
From: bdawes_at_[hidden]
Date: 2012-04-15 15:16:50
Author: bemandawes
Date: 2012-04-15 15:16:49 EDT (Sun, 15 Apr 2012)
New Revision: 77997
URL: http://svn.boost.org/trac/boost/changeset/77997
Log:
Tighten config.hpp and Jamfile logic before attaching static build problems.
Text files modified:
trunk/boost/filesystem/config.hpp | 26 +++++++++++++++++++++++++-
trunk/boost/system/config.hpp | 17 +++++++++++++++++
trunk/libs/filesystem/build/Jamfile.v2 | 4 +++-
trunk/libs/system/test/Jamfile.v2 | 1 +
4 files changed, 46 insertions(+), 2 deletions(-)
Modified: trunk/boost/filesystem/config.hpp
==============================================================================
--- trunk/boost/filesystem/config.hpp (original)
+++ trunk/boost/filesystem/config.hpp 2012-04-15 15:16:49 EDT (Sun, 15 Apr 2012)
@@ -49,7 +49,31 @@
# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
# endif
-// enable dynamic linking -------------------------------------------------------------//
+// This header implements separate compilation features as described in
+// http://www.boost.org/more/separate_compilation.html
+
+// normalize macros ------------------------------------------------------------------//
+
+#if !defined(BOOST_FILESYSTEM_DYN_LINK) && !defined(BOOST_FILESYSTEM_STATIC_LINK) \
+ && !defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_ALL_STATIC_LINK)
+# error Must define BOOST_ALL_DYN_LINK, BOOST_ALL_DYN_LINK, BOOST_FILESYSTEM_DYN_LINK, or BOOST_FILESYSTEM_STATIC_LINK
+#endif
+
+#if defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_FILESYSTEM_DYN_LINK)
+# define BOOST_FILESYSTEM_DYN_LINK
+#elif defined(BOOST_ALL_STATIC_LINK) && !defined(BOOST_FILESYSTEM_STATIC_LINK)
+# define BOOST_FILESYSTEM_STATIC_LINK
+#endif
+
+#if defined(BOOST_FILESYSTEM_DYN_LINK) && defined(BOOST_FILESYSTEM_STATIC_LINK)
+# error Must not define both BOOST_FILESYSTEM_DYN_LINK and BOOST_FILESYSTEM_STATIC_LINK
+#endif
+
+#if defined(BOOST_ALL_NO_LIB) && !defined(BOOST_FILESYSTEM_NO_LIB)
+# define BOOST_FILESYSTEM_NO_LIB
+#endif
+
+// enable dynamic linking ------------------------------------------------------------//
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_FILESYSTEM_DYN_LINK)
# if defined(BOOST_FILESYSTEM_SOURCE)
Modified: trunk/boost/system/config.hpp
==============================================================================
--- trunk/boost/system/config.hpp (original)
+++ trunk/boost/system/config.hpp 2012-04-15 15:16:49 EDT (Sun, 15 Apr 2012)
@@ -28,6 +28,23 @@
// This header implements separate compilation features as described in
// http://www.boost.org/more/separate_compilation.html
+// normalize macros ------------------------------------------------------------------//
+
+#if !defined(BOOST_SYSTEM_DYN_LINK) && !defined(BOOST_SYSTEM_STATIC_LINK) \
+ && !defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_ALL_STATIC_LINK)
+# error Must define BOOST_ALL_DYN_LINK, BOOST_ALL_DYN_LINK, BOOST_SYSTEM_DYN_LINK, or BOOST_SYSTEM_STATIC_LINK
+#endif
+
+#if defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_SYSTEM_DYN_LINK)
+# define BOOST_SYSTEM_DYN_LINK
+#elif defined(BOOST_ALL_STATIC_LINK) && !defined(BOOST_SYSTEM_STATIC_LINK)
+# define BOOST_SYSTEM_STATIC_LINK
+#endif
+
+#if defined(BOOST_SYSTEM_DYN_LINK) && defined(BOOST_SYSTEM_STATIC_LINK)
+# error Must not define both BOOST_SYSTEM_DYN_LINK and BOOST_SYSTEM_STATIC_LINK
+#endif
+
// enable dynamic or static linking as requested --------------------------------------//
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK)
Modified: trunk/libs/filesystem/build/Jamfile.v2
==============================================================================
--- trunk/libs/filesystem/build/Jamfile.v2 (original)
+++ trunk/libs/filesystem/build/Jamfile.v2 2012-04-15 15:16:49 EDT (Sun, 15 Apr 2012)
@@ -10,6 +10,7 @@
: source-location ../src
: usage-requirements # pass these requirement to dependents (i.e. users)
<link>shared:<define>BOOST_FILESYSTEM_DYN_LINK=1
+ <link>static:<define>BOOST_FILESYSTEM_STATIC_LINK=1
;
SOURCES =
@@ -25,7 +26,8 @@
lib boost_filesystem
: $(SOURCES).cpp ../../system/build//boost_system
- : <link>shared:<define>BOOST_FILESYSTEM_DYN_LINK=1 # tell source we're building dll's
+ : <link>shared:<define>BOOST_FILESYSTEM_DYN_LINK=1
+ <link>static:<define>BOOST_FILESYSTEM_STATIC_LINK=1
:
: # Boost.Filesystem uses some of Boost.System functions in inlined/templated
# functions, so clients that use Boost.Filesystem will have direct references
Modified: trunk/libs/system/test/Jamfile.v2
==============================================================================
--- trunk/libs/system/test/Jamfile.v2 (original)
+++ trunk/libs/system/test/Jamfile.v2 2012-04-15 15:16:49 EDT (Sun, 15 Apr 2012)
@@ -16,6 +16,7 @@
lib throw_test
: throw_test.cpp
: <link>shared:<define>BOOST_SYSTEM_DYN_LINK=1
+ <link>static:<define>BOOST_SYSTEM_STATIC_LINK=1
;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk