Chris@16: // boost/filesystem/v3/config.hpp ----------------------------------------------------// Chris@16: Chris@16: // Copyright Beman Dawes 2003 Chris@16: Chris@16: // Distributed under the Boost Software License, Version 1.0. Chris@16: // See http://www.boost.org/LICENSE_1_0.txt Chris@16: Chris@16: // Library home page: http://www.boost.org/libs/filesystem Chris@16: Chris@16: //--------------------------------------------------------------------------------------// Chris@16: Chris@16: #ifndef BOOST_FILESYSTEM3_CONFIG_HPP Chris@16: #define BOOST_FILESYSTEM3_CONFIG_HPP Chris@16: Chris@16: # if defined(BOOST_FILESYSTEM_VERSION) && BOOST_FILESYSTEM_VERSION != 3 Chris@16: # error Compiling Filesystem version 3 file with BOOST_FILESYSTEM_VERSION defined != 3 Chris@16: # endif Chris@16: Chris@16: # if !defined(BOOST_FILESYSTEM_VERSION) Chris@16: # define BOOST_FILESYSTEM_VERSION 3 Chris@16: # endif Chris@16: Chris@16: #define BOOST_FILESYSTEM_I18N // aid users wishing to compile several versions Chris@16: Chris@16: // This header implements separate compilation features as described in Chris@16: // http://www.boost.org/more/separate_compilation.html Chris@16: Chris@16: #include Chris@16: #include // for BOOST_POSIX_API or BOOST_WINDOWS_API Chris@16: #include Chris@16: Chris@16: // BOOST_FILESYSTEM_DEPRECATED needed for source compiles -----------------------------// Chris@16: Chris@16: # ifdef BOOST_FILESYSTEM_SOURCE Chris@16: # define BOOST_FILESYSTEM_DEPRECATED Chris@16: # endif Chris@16: Chris@16: // throw an exception ----------------------------------------------------------------// Chris@16: // Chris@16: // Exceptions were originally thrown via boost::throw_exception(). Chris@16: // As throw_exception() became more complex, it caused user error reporting Chris@16: // to be harder to interpret, since the exception reported became much more complex. Chris@16: // The immediate fix was to throw directly, wrapped in a macro to make any later change Chris@16: // easier. Chris@16: Chris@16: #define BOOST_FILESYSTEM_THROW(EX) throw EX Chris@16: Chris@16: # if defined( BOOST_NO_STD_WSTRING ) Chris@16: # error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support Chris@16: # endif Chris@16: Chris@16: // This header implements separate compilation features as described in Chris@16: // http://www.boost.org/more/separate_compilation.html Chris@16: Chris@16: // normalize macros ------------------------------------------------------------------// Chris@16: Chris@16: #if !defined(BOOST_FILESYSTEM_DYN_LINK) && !defined(BOOST_FILESYSTEM_STATIC_LINK) \ Chris@16: && !defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_ALL_STATIC_LINK) Chris@16: # define BOOST_FILESYSTEM_STATIC_LINK Chris@16: #endif Chris@16: Chris@16: #if defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_FILESYSTEM_DYN_LINK) Chris@16: # define BOOST_FILESYSTEM_DYN_LINK Chris@16: #elif defined(BOOST_ALL_STATIC_LINK) && !defined(BOOST_FILESYSTEM_STATIC_LINK) Chris@16: # define BOOST_FILESYSTEM_STATIC_LINK Chris@16: #endif Chris@16: Chris@16: #if defined(BOOST_FILESYSTEM_DYN_LINK) && defined(BOOST_FILESYSTEM_STATIC_LINK) Chris@16: # error Must not define both BOOST_FILESYSTEM_DYN_LINK and BOOST_FILESYSTEM_STATIC_LINK Chris@16: #endif Chris@16: Chris@16: #if defined(BOOST_ALL_NO_LIB) && !defined(BOOST_FILESYSTEM_NO_LIB) Chris@16: # define BOOST_FILESYSTEM_NO_LIB Chris@16: #endif Chris@16: Chris@16: // enable dynamic linking ------------------------------------------------------------// Chris@16: Chris@16: #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_FILESYSTEM_DYN_LINK) Chris@16: # if defined(BOOST_FILESYSTEM_SOURCE) Chris@16: # define BOOST_FILESYSTEM_DECL BOOST_SYMBOL_EXPORT Chris@16: # else Chris@16: # define BOOST_FILESYSTEM_DECL BOOST_SYMBOL_IMPORT Chris@16: # endif Chris@16: #else Chris@16: # define BOOST_FILESYSTEM_DECL Chris@16: #endif Chris@16: Chris@16: // enable automatic library variant selection ----------------------------------------// Chris@16: Chris@16: #if !defined(BOOST_FILESYSTEM_SOURCE) && !defined(BOOST_ALL_NO_LIB) \ Chris@16: && !defined(BOOST_FILESYSTEM_NO_LIB) Chris@16: // Chris@16: // Set the name of our library, this will get undef'ed by auto_link.hpp Chris@16: // once it's done with it: Chris@16: // Chris@16: #define BOOST_LIB_NAME boost_filesystem Chris@16: // Chris@16: // If we're importing code from a dll, then tell auto_link.hpp about it: Chris@16: // Chris@16: #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_FILESYSTEM_DYN_LINK) Chris@16: # define BOOST_DYN_LINK Chris@16: #endif Chris@16: // Chris@16: // And include the header that does the work: Chris@16: // Chris@16: #include Chris@16: #endif // auto-linking disabled Chris@16: Chris@16: #endif // BOOST_FILESYSTEM3_CONFIG_HPP