1 | // boost/filesystem/config.hpp ---------------------------------------------// |
---|
2 | |
---|
3 | // Copyright Beman Dawes 2003 |
---|
4 | // Use, modification, and distribution is subject to the Boost Software |
---|
5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at |
---|
6 | // http://www.boost.org/LICENSE_1_0.txt) |
---|
7 | |
---|
8 | // See library home page at http://www.boost.org/libs/filesystem |
---|
9 | |
---|
10 | //----------------------------------------------------------------------------// |
---|
11 | |
---|
12 | #ifndef BOOST_FILESYSTEM_CONFIG_HPP |
---|
13 | #define BOOST_FILESYSTEM_CONFIG_HPP |
---|
14 | |
---|
15 | #define BOOST_FILESYSTEM_I18N // aid users wishing to compile several versions |
---|
16 | |
---|
17 | // ability to change namespace aids path_table.cpp ------------------------// |
---|
18 | #ifndef BOOST_FILESYSTEM_NAMESPACE |
---|
19 | # define BOOST_FILESYSTEM_NAMESPACE filesystem |
---|
20 | #endif |
---|
21 | |
---|
22 | // This header implements separate compilation features as described in |
---|
23 | // http://www.boost.org/more/separate_compilation.html |
---|
24 | |
---|
25 | #include <boost/config.hpp> |
---|
26 | |
---|
27 | // determine platform ------------------------------------------------------// |
---|
28 | |
---|
29 | // BOOST_CYGWIN_PATH implies BOOST_WINDOWS_PATH and BOOST_POSIX_API |
---|
30 | |
---|
31 | # if defined(BOOST_CYGWIN_PATH) |
---|
32 | # if defined(BOOST_POSIX_PATH) |
---|
33 | # error BOOST_POSIX_PATH is invalid when BOOST_CYGWIN_PATH is defined |
---|
34 | # endif |
---|
35 | # if defined(BOOST_WINDOWS_API) |
---|
36 | # error BOOST_WINDOWS_API is invalid when BOOST_CYGWIN_PATH is defined |
---|
37 | # endif |
---|
38 | # define BOOST_WINDOWS_PATH |
---|
39 | # define BOOST_POSIX_API |
---|
40 | # endif |
---|
41 | |
---|
42 | // BOOST_POSIX_API or BOOST_WINDOWS_API specify which API to use |
---|
43 | |
---|
44 | # if defined( BOOST_WINDOWS_API ) && defined( BOOST_POSIX_API ) |
---|
45 | # error both BOOST_WINDOWS_API and BOOST_POSIX_API are defined |
---|
46 | # elif !defined( BOOST_WINDOWS_API ) && !defined( BOOST_POSIX_API ) |
---|
47 | # if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__) |
---|
48 | # define BOOST_WINDOWS_API |
---|
49 | # else |
---|
50 | # define BOOST_POSIX_API |
---|
51 | # endif |
---|
52 | # endif |
---|
53 | |
---|
54 | // BOOST_WINDOWS_PATH enables Windows path syntax recognition |
---|
55 | |
---|
56 | # if !defined(BOOST_POSIX_PATH) && (defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__)) |
---|
57 | # define BOOST_WINDOWS_PATH |
---|
58 | # endif |
---|
59 | |
---|
60 | // narrow support only for badly broken compilers or libraries -------------// |
---|
61 | |
---|
62 | # if defined(BOOST_NO_STD_WSTRING) || defined(BOOST_NO_SFINAE) || defined(BOOST_NO_STD_LOCALE) |
---|
63 | # define BOOST_FILESYSTEM_NARROW_ONLY |
---|
64 | # endif |
---|
65 | |
---|
66 | // enable dynamic linking on Windows ---------------------------------------// |
---|
67 | |
---|
68 | # if (defined(BOOST_ALL_DYN_LINK) || defined(BOOST_FILESYSTEM_DYN_LINK)) && defined(__BORLANDC__) && defined(__WIN32__) |
---|
69 | # error Dynamic linking Boost.Filesystem does not work for Borland; use static linking instead |
---|
70 | # endif |
---|
71 | |
---|
72 | #ifdef BOOST_HAS_DECLSPEC // defined in config system |
---|
73 | // we need to import/export our code only if the user has specifically |
---|
74 | // asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost |
---|
75 | // libraries to be dynamically linked, or BOOST_FILESYSTEM_DYN_LINK |
---|
76 | // if they want just this one to be dynamically liked: |
---|
77 | #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_FILESYSTEM_DYN_LINK) |
---|
78 | // export if this is our own source, otherwise import: |
---|
79 | #ifdef BOOST_FILESYSTEM_SOURCE |
---|
80 | # define BOOST_FILESYSTEM_DECL __declspec(dllexport) |
---|
81 | #else |
---|
82 | # define BOOST_FILESYSTEM_DECL __declspec(dllimport) |
---|
83 | #endif // BOOST_FILESYSTEM_SOURCE |
---|
84 | #endif // DYN_LINK |
---|
85 | #endif // BOOST_HAS_DECLSPEC |
---|
86 | // |
---|
87 | // if BOOST_FILESYSTEM_DECL isn't defined yet define it now: |
---|
88 | #ifndef BOOST_FILESYSTEM_DECL |
---|
89 | #define BOOST_FILESYSTEM_DECL |
---|
90 | #endif |
---|
91 | |
---|
92 | // enable automatic library variant selection ------------------------------// |
---|
93 | |
---|
94 | #if !defined(BOOST_FILESYSTEM_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_FILESYSTEM_NO_LIB) |
---|
95 | // |
---|
96 | // Set the name of our library, this will get undef'ed by auto_link.hpp |
---|
97 | // once it's done with it: |
---|
98 | // |
---|
99 | #define BOOST_LIB_NAME boost_filesystem |
---|
100 | // |
---|
101 | // If we're importing code from a dll, then tell auto_link.hpp about it: |
---|
102 | // |
---|
103 | #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_FILESYSTEM_DYN_LINK) |
---|
104 | # define BOOST_DYN_LINK |
---|
105 | #endif |
---|
106 | // |
---|
107 | // And include the header that does the work: |
---|
108 | // |
---|
109 | #include <boost/config/auto_link.hpp> |
---|
110 | #endif // auto-linking disabled |
---|
111 | |
---|
112 | #endif // BOOST_FILESYSTEM_CONFIG_HPP |
---|