1
// boost/filesystem/v2/config.hpp ------------------------------------------//
3
// Copyright Beman Dawes 2003
5
// Distributed under the Boost Software License, Version 1.0. (See accompanying
6
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8
// See library home page at http://www.boost.org/libs/filesystem
10
//----------------------------------------------------------------------------//
12
#ifndef BOOST_FILESYSTEM2_CONFIG_HPP
13
#define BOOST_FILESYSTEM2_CONFIG_HPP
15
# if defined(BOOST_FILESYSTEM_VERSION) && BOOST_FILESYSTEM_VERSION != 2
16
# error Compiling Filesystem version 2 file with BOOST_FILESYSTEM_VERSION defined != 2
19
# if !defined(BOOST_FILESYSTEM_VERSION)
20
# define BOOST_FILESYSTEM_VERSION 2
23
#define BOOST_FILESYSTEM_I18N // aid users wishing to compile several versions
25
// ability to change namespace aids path_table.cpp ------------------------//
26
#ifndef BOOST_FILESYSTEM2_NAMESPACE
27
# define BOOST_FILESYSTEM2_NAMESPACE filesystem2
30
#include <boost/config.hpp>
31
#include <boost/system/api_config.hpp> // for BOOST_POSIX_API or BOOST_WINDOWS_API
32
#include <boost/detail/workaround.hpp>
34
// BOOST_POSIX_PATH or BOOST_WINDOWS_PATH specify which path syntax to recognise
36
# if defined(BOOST_WINDOWS_API) && defined(BOOST_POSIX_PATH)
37
# error builds with Windows API do not support BOOST_POSIX_PATH
40
# if !defined(_WIN32) && !defined(__CYGWIN__) && defined(BOOST_WINDOWS_PATH)
41
# error builds on non-Windows platforms do not support BOOST_WINDOWS_PATH
44
# if defined(BOOST_WINDOWS_PATH) && defined(BOOST_POSIX_PATH)
45
# error both BOOST_WINDOWS_PATH and BOOST_POSIX_PATH are defined
46
# elif !defined(BOOST_WINDOWS_PATH) && !defined(BOOST_POSIX_PATH)
47
# if !defined(BOOST_POSIX_PATH) && (defined(_WIN32) || defined(__CYGWIN__))
48
# define BOOST_WINDOWS_PATH
50
# define BOOST_POSIX_PATH
54
// narrow support only for badly broken compilers or libraries -------------//
56
# if defined(BOOST_NO_STD_WSTRING) || defined(BOOST_NO_SFINAE) || defined(BOOST_NO_STD_LOCALE) || BOOST_WORKAROUND(__BORLANDC__, <0x610)
57
# define BOOST_FILESYSTEM2_NARROW_ONLY
60
// This header implements separate compilation features as described in
61
// http://www.boost.org/more/separate_compilation.html
63
// enable dynamic linking ---------------------------------------------------//
65
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_FILESYSTEM_DYN_LINK)
66
# if defined(BOOST_FILESYSTEM_SOURCE)
67
# define BOOST_FILESYSTEM_DECL BOOST_SYMBOL_EXPORT
69
# define BOOST_FILESYSTEM_DECL BOOST_SYMBOL_IMPORT
72
# define BOOST_FILESYSTEM_DECL
75
// enable automatic library variant selection ------------------------------//
77
#if !defined(BOOST_FILESYSTEM_SOURCE) && !defined(BOOST_ALL_NO_LIB) \
78
&& !defined(BOOST_FILESYSTEM_NO_LIB)
80
// Set the name of our library, this will get undef'ed by auto_link.hpp
81
// once it's done with it:
83
#define BOOST_LIB_NAME boost_filesystem
85
// If we're importing code from a dll, then tell auto_link.hpp about it:
87
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_FILESYSTEM_DYN_LINK)
88
# define BOOST_DYN_LINK
91
// And include the header that does the work:
93
#include <boost/config/auto_link.hpp>
94
#endif // auto-linking disabled
96
#endif // BOOST_FILESYSTEM2_CONFIG_HPP