blob: f70bec22a9a6d87b13e0cc9800f0a134c3419e83 [file] [log] [blame]
Jeff Thompson86b6d642013-10-17 15:01:56 -07001// ndnboost/filesystem/v3/config.hpp ----------------------------------------------------//
2
3// Copyright Beman Dawes 2003
4
5// Distributed under the Boost Software License, Version 1.0.
6// See http://www.boost.org/LICENSE_1_0.txt
7
8// Library home page: http://www.boost.org/libs/filesystem
9
10//--------------------------------------------------------------------------------------//
11
12#ifndef NDNBOOST_FILESYSTEM3_CONFIG_HPP
13#define NDNBOOST_FILESYSTEM3_CONFIG_HPP
14
15# if defined(NDNBOOST_FILESYSTEM_VERSION) && NDNBOOST_FILESYSTEM_VERSION != 3
16# error Compiling Filesystem version 3 file with NDNBOOST_FILESYSTEM_VERSION defined != 3
17# endif
18
19# if !defined(NDNBOOST_FILESYSTEM_VERSION)
20# define NDNBOOST_FILESYSTEM_VERSION 3
21# endif
22
23#define NDNBOOST_FILESYSTEM_I18N // aid users wishing to compile several versions
24
25// This header implements separate compilation features as described in
26// http://www.boost.org/more/separate_compilation.html
27
28#include <ndnboost/config.hpp>
29#include <ndnboost/system/api_config.hpp> // for NDNBOOST_POSIX_API or NDNBOOST_WINDOWS_API
30#include <ndnboost/detail/workaround.hpp>
31
32// NDNBOOST_FILESYSTEM_DEPRECATED needed for source compiles -----------------------------//
33
34# ifdef NDNBOOST_FILESYSTEM_SOURCE
35# define NDNBOOST_FILESYSTEM_DEPRECATED
36# endif
37
38// throw an exception ----------------------------------------------------------------//
39//
40// Exceptions were originally thrown via ndnboost::throw_exception().
41// As throw_exception() became more complex, it caused user error reporting
42// to be harder to interpret, since the exception reported became much more complex.
43// The immediate fix was to throw directly, wrapped in a macro to make any later change
44// easier.
45
46#define NDNBOOST_FILESYSTEM_THROW(EX) throw EX
47
48# if defined( NDNBOOST_NO_STD_WSTRING )
49# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
50# endif
51
52// This header implements separate compilation features as described in
53// http://www.boost.org/more/separate_compilation.html
54
55// normalize macros ------------------------------------------------------------------//
56
57#if !defined(NDNBOOST_FILESYSTEM_DYN_LINK) && !defined(NDNBOOST_FILESYSTEM_STATIC_LINK) \
58 && !defined(NDNBOOST_ALL_DYN_LINK) && !defined(NDNBOOST_ALL_STATIC_LINK)
59# define NDNBOOST_FILESYSTEM_STATIC_LINK
60#endif
61
62#if defined(NDNBOOST_ALL_DYN_LINK) && !defined(NDNBOOST_FILESYSTEM_DYN_LINK)
63# define NDNBOOST_FILESYSTEM_DYN_LINK
64#elif defined(NDNBOOST_ALL_STATIC_LINK) && !defined(NDNBOOST_FILESYSTEM_STATIC_LINK)
65# define NDNBOOST_FILESYSTEM_STATIC_LINK
66#endif
67
68#if defined(NDNBOOST_FILESYSTEM_DYN_LINK) && defined(NDNBOOST_FILESYSTEM_STATIC_LINK)
69# error Must not define both NDNBOOST_FILESYSTEM_DYN_LINK and NDNBOOST_FILESYSTEM_STATIC_LINK
70#endif
71
72#if defined(NDNBOOST_ALL_NO_LIB) && !defined(NDNBOOST_FILESYSTEM_NO_LIB)
73# define NDNBOOST_FILESYSTEM_NO_LIB
74#endif
75
76// enable dynamic linking ------------------------------------------------------------//
77
78#if defined(NDNBOOST_ALL_DYN_LINK) || defined(NDNBOOST_FILESYSTEM_DYN_LINK)
79# if defined(NDNBOOST_FILESYSTEM_SOURCE)
80# define NDNBOOST_FILESYSTEM_DECL NDNBOOST_SYMBOL_EXPORT
81# else
82# define NDNBOOST_FILESYSTEM_DECL NDNBOOST_SYMBOL_IMPORT
83# endif
84#else
85# define NDNBOOST_FILESYSTEM_DECL
86#endif
87
88// enable automatic library variant selection ----------------------------------------//
89
90#if !defined(NDNBOOST_FILESYSTEM_SOURCE) && !defined(NDNBOOST_ALL_NO_LIB) \
91 && !defined(NDNBOOST_FILESYSTEM_NO_LIB)
92//
93// Set the name of our library, this will get undef'ed by auto_link.hpp
94// once it's done with it:
95//
96#define NDNBOOST_LIB_NAME ndnboost_filesystem
97//
98// If we're importing code from a dll, then tell auto_link.hpp about it:
99//
100#if defined(NDNBOOST_ALL_DYN_LINK) || defined(NDNBOOST_FILESYSTEM_DYN_LINK)
101# define NDNBOOST_DYN_LINK
102#endif
103//
104// And include the header that does the work:
105//
106#include <ndnboost/config/auto_link.hpp>
107#endif // auto-linking disabled
108
109#endif // NDNBOOST_FILESYSTEM3_CONFIG_HPP