1 // Copyright (c) 2007-2012 Hartmut Kaiser 2 // Copyright (c) 2011 Bryce Lelbach 3 // 4 // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 7 #if !defined(HPX_EXPORT_DEFINITIONS_SEPTEMBER_25_2008_0214PM) 8 #define HPX_EXPORT_DEFINITIONS_SEPTEMBER_25_2008_0214PM 9 10 #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) 11 # define HPX_SYMBOL_EXPORT __declspec(dllexport) 12 # define HPX_SYMBOL_IMPORT __declspec(dllimport) 13 # define HPX_SYMBOL_INTERNAL /* empty */ 14 # define HPX_APISYMBOL_EXPORT __declspec(dllexport) 15 # define HPX_APISYMBOL_IMPORT __declspec(dllimport) 16 #elif defined(__NVCC__) || defined(__CUDACC__) 17 # define HPX_SYMBOL_EXPORT /* empty */ 18 # define HPX_SYMBOL_IMPORT /* empty */ 19 # define HPX_SYMBOL_INTERNAL /* empty */ 20 # define HPX_APISYMBOL_EXPORT /* empty */ 21 # define HPX_APISYMBOL_IMPORT /* empty */ 22 #elif defined(HPX_HAVE_ELF_HIDDEN_VISIBILITY) 23 # define HPX_SYMBOL_EXPORT __attribute__((visibility("default"))) 24 # define HPX_SYMBOL_IMPORT __attribute__((visibility("default"))) 25 # define HPX_SYMBOL_INTERNAL __attribute__((visibility("hidden"))) 26 # define HPX_APISYMBOL_EXPORT __attribute__((visibility("default"))) 27 # define HPX_APISYMBOL_IMPORT __attribute__((visibility("default"))) 28 #endif 29 30 // make sure we have reasonable defaults 31 #if !defined(HPX_SYMBOL_EXPORT) 32 # define HPX_SYMBOL_EXPORT /* empty */ 33 #endif 34 #if !defined(HPX_SYMBOL_IMPORT) 35 # define HPX_SYMBOL_IMPORT /* empty */ 36 #endif 37 #if !defined(HPX_SYMBOL_INTERNAL) 38 # define HPX_SYMBOL_INTERNAL /* empty */ 39 #endif 40 #if !defined(HPX_APISYMBOL_EXPORT) 41 # define HPX_APISYMBOL_EXPORT /* empty */ 42 #endif 43 #if !defined(HPX_APISYMBOL_IMPORT) 44 # define HPX_APISYMBOL_IMPORT /* empty */ 45 #endif 46 47 /////////////////////////////////////////////////////////////////////////////// 48 // define the export/import helper macros used by the runtime module 49 #if defined(HPX_EXPORTS) 50 # define HPX_EXPORT HPX_SYMBOL_EXPORT 51 # define HPX_EXCEPTION_EXPORT HPX_SYMBOL_EXPORT 52 # define HPX_API_EXPORT HPX_APISYMBOL_EXPORT 53 #else 54 # define HPX_EXPORT HPX_SYMBOL_IMPORT 55 # define HPX_EXCEPTION_EXPORT HPX_SYMBOL_IMPORT 56 # define HPX_API_EXPORT HPX_APISYMBOL_IMPORT 57 #endif 58 59 /////////////////////////////////////////////////////////////////////////////// 60 // define the export/import helper macros to be used for component modules 61 #if defined(HPX_COMPONENT_EXPORTS) 62 # define HPX_COMPONENT_EXPORT HPX_SYMBOL_EXPORT 63 #else 64 # define HPX_COMPONENT_EXPORT HPX_SYMBOL_IMPORT 65 #endif 66 67 /////////////////////////////////////////////////////////////////////////////// 68 // define the export/import helper macros to be used for component modules 69 #if defined(HPX_LIBRARY_EXPORTS) 70 # define HPX_LIBRARY_EXPORT HPX_SYMBOL_EXPORT 71 #else 72 # define HPX_LIBRARY_EXPORT HPX_SYMBOL_IMPORT 73 #endif 74 75 /////////////////////////////////////////////////////////////////////////////// 76 // helper macro for symbols which have to be exported from the runtime and all 77 // components 78 #if defined(HPX_EXPORTS) || defined(HPX_COMPONENT_EXPORTS) || \ 79 defined(HPX_APPLICATION_EXPORTS) || defined(HPX_SERIALIZATION_EXPORTS) || \ 80 defined(HPX_LIBRARY_EXPORTS) 81 # define HPX_ALWAYS_EXPORT HPX_SYMBOL_EXPORT 82 # define HPX_ALWAYS_IMPORT HPX_SYMBOL_IMPORT 83 #else 84 # define HPX_ALWAYS_EXPORT HPX_SYMBOL_IMPORT 85 # define HPX_ALWAYS_IMPORT HPX_SYMBOL_IMPORT 86 #endif 87 88 #endif 89