SAGA Adaptor CPI v.1.0
|
00001 // Copyright (c) 2005-2009 Hartmut Kaiser 00002 // 00003 // Distributed under the Boost Software License, Version 1.0. (See accompanying 00004 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 00005 00006 #ifndef SAGA_EXPORT_DEFINITIONS_HPP 00007 #define SAGA_EXPORT_DEFINITIONS_HPP 00008 00009 // For symbol import/export macros 00010 #include <saga/saga-defs.hpp> 00011 #include <boost/config.hpp> 00012 00013 #if !defined (SAGA_CREATE_PREPROCESSED_FILES) 00014 00015 # if defined(SAGA_WINDOWS) 00016 # if defined(BOOST_MSVC) 00017 # define SAGA_DEPRECATED(x) __declspec(deprecated(x)) 00018 # endif 00019 # elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) 00020 # define SAGA_DEPRECATED(x) __attribute__((__deprecated__)) 00021 # endif 00022 00023 #if !defined(SAGA_DEPRECATED) 00024 #define SAGA_DEPRECATED(x) 00025 #endif 00026 00027 # if defined(SAGA_WINDOWS) 00028 # define SAGA_SYMBOL_EXPORT __declspec (dllexport) 00029 # define SAGA_SYMBOL_EXPORT_REPEAT SAGA_SYMBOL_EXPORT 00030 # define SAGA_SYMBOL_IMPORT __declspec (dllimport) 00031 # define SAGA_SYMBOL_INTERNAL /* empty */ 00032 # elif defined(SAGA_GCC_HAVE_VISIBILITY) 00033 # define SAGA_SYMBOL_EXPORT __attribute__((visibility("default"))) 00034 # define SAGA_SYMBOL_EXPORT_REPEAT 00035 # define SAGA_SYMBOL_IMPORT __attribute__((visibility("default"))) 00036 # ifdef __sparc__ 00037 # define SAGA_SYMBOL_INTERNAL 00038 # else 00039 # define SAGA_SYMBOL_INTERNAL __attribute__((visibility("hidden"))) 00040 # endif 00041 # else 00042 # define SAGA_SYMBOL_EXPORT /* empty */ 00043 # define SAGA_SYMBOL_EXPORT_REPEAT 00044 # define SAGA_SYMBOL_IMPORT /* empty */ 00045 # define SAGA_SYMBOL_INTERNAL /* empty */ 00046 # endif 00047 00049 // define the export/import helper macros 00050 00051 # ifdef SAGA_ENGINE_EXPORTS 00052 # define SAGA_EXPORT SAGA_SYMBOL_EXPORT 00053 # define SAGA_EXPORT_REPEAT SAGA_SYMBOL_EXPORT_REPEAT 00054 # define SAGA_EXCEPTION_EXPORT SAGA_SYMBOL_EXPORT 00055 # elif !defined(BUILD_SAGA_LITE) 00056 # define SAGA_EXPORT SAGA_SYMBOL_IMPORT 00057 # define SAGA_EXPORT_REPEAT 00058 # define SAGA_EXCEPTION_EXPORT SAGA_SYMBOL_IMPORT 00059 # else 00060 # define SAGA_EXPORT /* empty */ 00061 # define SAGA_EXPORT_REPEAT 00062 # define SAGA_EXCEPTION_EXPORT /* empty */ 00063 # endif 00064 00065 # ifdef SAGA_PACKAGE_EXPORTS 00066 # define SAGA_PACKAGE_EXPORT SAGA_SYMBOL_EXPORT 00067 # define SAGA_PACKAGE_LOCAL SAGA_SYMBOL_INTERNAL 00068 # elif !defined(BUILD_SAGA_LITE) 00069 # define SAGA_PACKAGE_EXPORT SAGA_SYMBOL_IMPORT 00070 # define SAGA_PACKAGE_LOCAL SAGA_SYMBOL_INTERNAL 00071 # else 00072 # define SAGA_PACKAGE_EXPORT /* empty */ 00073 # define SAGA_PACKAGE_LOCAL /* empty */ 00074 # endif 00075 00076 # ifdef SAGA_ADAPTOR_EXPORTS 00077 # define SAGA_ADAPTOR_EXPORT SAGA_SYMBOL_EXPORT 00078 # define SAGA_ADAPTOR_LOCAL SAGA_SYMBOL_INTERNAL 00079 # elif !defined(BUILD_SAGA_LITE) 00080 # define SAGA_ADAPTOR_EXPORT SAGA_SYMBOL_IMPORT 00081 # define SAGA_ADAPTOR_LOCAL SAGA_SYMBOL_INTERNAL 00082 # else 00083 # define SAGA_ADAPTOR_EXPORT /* empty */ 00084 # define SAGA_ADAPTOR_LOCAL /* empty */ 00085 # endif 00086 00087 # define SAGA_LOCAL /* empty */ 00088 00089 #endif // !SAGA_CREATE_PREPROCESSED_FILES 00090 00091 #endif 00092 00093