1 // boost/filesystem/config.hpp ---------------------------------------------//
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)
8 // See library home page at http://www.boost.org/libs/filesystem
10 //----------------------------------------------------------------------------//
12 #ifndef BOOST_FILESYSTEM_CONFIG_HPP
13 #define BOOST_FILESYSTEM_CONFIG_HPP
15 // This header implements separate compilation features as described in
16 // http://www.boost.org/more/separate_compilation.html
18 #include <boost/config.hpp>
20 // enable dynamic linking on Windows ---------------------------------------//
22 #ifdef BOOST_HAS_DECLSPEC // defined in config system
23 // we need to import/export our code only if the user has specifically
24 // asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost
25 // libraries to be dynamically linked, or BOOST_FILESYSTEM_DYN_LINK
26 // if they want just this one to be dynamically liked:
27 #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_FILESYSTEM_DYN_LINK)
28 // export if this is our own source, otherwise import:
29 #ifdef BOOST_FILESYSTEM_SOURCE
30 # define BOOST_FILESYSTEM_DECL __declspec(dllexport)
32 # define BOOST_FILESYSTEM_DECL __declspec(dllimport)
33 #endif // BOOST_FILESYSTEM_SOURCE
35 #endif // BOOST_HAS_DECLSPEC
37 // if BOOST_FILESYSTEM_DECL isn't defined yet define it now:
38 #ifndef BOOST_FILESYSTEM_DECL
39 #define BOOST_FILESYSTEM_DECL
42 // enable automatic library variant selection ------------------------------//
44 #if !defined(BOOST_FILESYSTEM_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_FILESYSTEM_NO_LIB)
46 // Set the name of our library, this will get undef'ed by auto_link.hpp
47 // once it's done with it:
49 #define BOOST_LIB_NAME boost_filesystem
51 // If we're importing code from a dll, then tell auto_link.hpp about it:
53 #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_FILESYSTEM_DYN_LINK)
54 # define BOOST_DYN_LINK
57 // And include the header that does the work:
59 #include <boost/config/auto_link.hpp>
60 #endif // auto-linking disabled
62 #endif // BOOST_FILESYSTEM_CONFIG_HPP