126 lines
4.8 KiB
C++
126 lines
4.8 KiB
C++
// ActivBoost/filesystem/v3/config.hpp ----------------------------------------------------//
|
|
|
|
// Copyright Beman Dawes 2003
|
|
// Copyright Andrey Semashev 2021
|
|
|
|
// Distributed under the Boost Software License, Version 1.0.
|
|
// See http://www.boost.org/LICENSE_1_0.txt
|
|
|
|
// Library home page: http://www.boost.org/libs/filesystem
|
|
|
|
//--------------------------------------------------------------------------------------//
|
|
|
|
#ifndef ACTIV_BOOST_FILESYSTEM_CONFIG_HPP
|
|
#define ACTIV_BOOST_FILESYSTEM_CONFIG_HPP
|
|
|
|
// This header implements separate compilation features as described in
|
|
// http://www.boost.org/more/separate_compilation.html
|
|
|
|
#include <ActivBoost/config.hpp>
|
|
#include <ActivBoost/system/api_config.hpp> // for ACTIV_BOOST_POSIX_API or ACTIV_BOOST_WINDOWS_API
|
|
#include <ActivBoost/detail/workaround.hpp>
|
|
|
|
#if defined(ACTIV_BOOST_FILESYSTEM_VERSION) && ACTIV_BOOST_FILESYSTEM_VERSION != 3 && ACTIV_BOOST_FILESYSTEM_VERSION != 4
|
|
#error Compiling Boost.Filesystem file with ACTIV_BOOST_FILESYSTEM_VERSION defined != 3 or 4
|
|
#endif
|
|
|
|
#if defined(ACTIV_BOOST_FILESYSTEM_SOURCE)
|
|
#undef ACTIV_BOOST_FILESYSTEM_VERSION
|
|
#define ACTIV_BOOST_FILESYSTEM_VERSION 4
|
|
#elif !defined(ACTIV_BOOST_FILESYSTEM_VERSION)
|
|
#define ACTIV_BOOST_FILESYSTEM_VERSION 3
|
|
#endif
|
|
|
|
#define ACTIV_BOOST_FILESYSTEM_VERSIONED_SYM(sym) ACTIV_BOOST_JOIN(sym, ACTIV_BOOST_JOIN(_v, ACTIV_BOOST_FILESYSTEM_VERSION))
|
|
|
|
#if ACTIV_BOOST_FILESYSTEM_VERSION == 4
|
|
#undef ACTIV_BOOST_FILESYSTEM_DEPRECATED
|
|
#if !defined(ACTIV_BOOST_FILESYSTEM_NO_DEPRECATED)
|
|
#define ACTIV_BOOST_FILESYSTEM_NO_DEPRECATED
|
|
#endif
|
|
#endif
|
|
|
|
#define ACTIV_BOOST_FILESYSTEM_I18N // aid users wishing to compile several versions
|
|
|
|
// ACTIV_BOOST_FILESYSTEM_DEPRECATED needed for source compiles -----------------------------//
|
|
|
|
#ifdef ACTIV_BOOST_FILESYSTEM_SOURCE
|
|
#define ACTIV_BOOST_FILESYSTEM_DEPRECATED
|
|
#undef ACTIV_BOOST_FILESYSTEM_NO_DEPRECATED // fixes #9454, src bld fails if NO_DEP defined
|
|
#endif
|
|
|
|
#if defined(ACTIV_BOOST_FILESYSTEM_DEPRECATED) && defined(ACTIV_BOOST_FILESYSTEM_NO_DEPRECATED)
|
|
#error Both ACTIV_BOOST_FILESYSTEM_DEPRECATED and ACTIV_BOOST_FILESYSTEM_NO_DEPRECATED are defined
|
|
#endif
|
|
|
|
// throw an exception ----------------------------------------------------------------//
|
|
//
|
|
// Exceptions were originally thrown via Boost::throw_exception().
|
|
// As throw_exception() became more complex, it caused user error reporting
|
|
// to be harder to interpret, since the exception reported became much more complex.
|
|
// The immediate fix was to throw directly, wrapped in a macro to make any later change
|
|
// easier.
|
|
|
|
#define ACTIV_BOOST_FILESYSTEM_THROW(EX) throw EX
|
|
|
|
#if defined(ACTIV_BOOST_NO_STD_WSTRING)
|
|
#error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
|
|
#endif
|
|
|
|
// This header implements separate compilation features as described in
|
|
// http://www.boost.org/more/separate_compilation.html
|
|
|
|
// normalize macros ------------------------------------------------------------------//
|
|
|
|
#if !defined(ACTIV_BOOST_FILESYSTEM_DYN_LINK) && !defined(ACTIV_BOOST_FILESYSTEM_STATIC_LINK) && !defined(ACTIV_BOOST_ALL_DYN_LINK) && !defined(ACTIV_BOOST_ALL_STATIC_LINK)
|
|
#define ACTIV_BOOST_FILESYSTEM_STATIC_LINK
|
|
#endif
|
|
|
|
#if defined(ACTIV_BOOST_ALL_DYN_LINK) && !defined(ACTIV_BOOST_FILESYSTEM_DYN_LINK)
|
|
#define ACTIV_BOOST_FILESYSTEM_DYN_LINK
|
|
#elif defined(ACTIV_BOOST_ALL_STATIC_LINK) && !defined(ACTIV_BOOST_FILESYSTEM_STATIC_LINK)
|
|
#define ACTIV_BOOST_FILESYSTEM_STATIC_LINK
|
|
#endif
|
|
|
|
#if defined(ACTIV_BOOST_FILESYSTEM_DYN_LINK) && defined(ACTIV_BOOST_FILESYSTEM_STATIC_LINK)
|
|
#error Must not define both ACTIV_BOOST_FILESYSTEM_DYN_LINK and ACTIV_BOOST_FILESYSTEM_STATIC_LINK
|
|
#endif
|
|
|
|
#if defined(ACTIV_BOOST_ALL_NO_LIB) && !defined(ACTIV_BOOST_FILESYSTEM_NO_LIB)
|
|
#define ACTIV_BOOST_FILESYSTEM_NO_LIB
|
|
#endif
|
|
|
|
// enable dynamic linking ------------------------------------------------------------//
|
|
|
|
#if defined(ACTIV_BOOST_ALL_DYN_LINK) || defined(ACTIV_BOOST_FILESYSTEM_DYN_LINK)
|
|
#if defined(ACTIV_BOOST_FILESYSTEM_SOURCE)
|
|
#define ACTIV_BOOST_FILESYSTEM_DECL ACTIV_BOOST_SYMBOL_EXPORT
|
|
#else
|
|
#define ACTIV_BOOST_FILESYSTEM_DECL ACTIV_BOOST_SYMBOL_IMPORT
|
|
#endif
|
|
#else
|
|
#define ACTIV_BOOST_FILESYSTEM_DECL
|
|
#endif
|
|
|
|
// enable automatic library variant selection ----------------------------------------//
|
|
|
|
#if !defined(ACTIV_BOOST_FILESYSTEM_SOURCE) && !defined(ACTIV_BOOST_ALL_NO_LIB) && !defined(ACTIV_BOOST_FILESYSTEM_NO_LIB)
|
|
//
|
|
// Set the name of our library, this will get undef'ed by auto_link.hpp
|
|
// once it's done with it:
|
|
//
|
|
#define ACTIV_BOOST_LIB_NAME Boost_filesystem
|
|
//
|
|
// If we're importing code from a dll, then tell auto_link.hpp about it:
|
|
//
|
|
#if defined(ACTIV_BOOST_ALL_DYN_LINK) || defined(ACTIV_BOOST_FILESYSTEM_DYN_LINK)
|
|
#define ACTIV_BOOST_DYN_LINK
|
|
#endif
|
|
//
|
|
// And include the header that does the work:
|
|
//
|
|
#include <ActivBoost/config/auto_link.hpp>
|
|
#endif // auto-linking disabled
|
|
|
|
#endif // ACTIV_BOOST_FILESYSTEM_CONFIG_HPP
|