summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2010-05-11 20:59:55 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2010-05-11 20:59:55 (GMT)
commit3da997e38fde296448498ee58202fe81c4ad7f3f (patch)
treeb5f6c114a7c73ff42fb3ab02780bf35fe14475bd
parent68fa42f3360945d07a0443289025a6a91618aac5 (diff)
downloadhdf5-3da997e38fde296448498ee58202fe81c4ad7f3f.zip
hdf5-3da997e38fde296448498ee58202fe81c4ad7f3f.tar.gz
hdf5-3da997e38fde296448498ee58202fe81c4ad7f3f.tar.bz2
[svn-r18761] File needed to correctly set new H5TOOLS_* export/import attribute
-rw-r--r--src/H5api_adpt.h281
1 files changed, 281 insertions, 0 deletions
diff --git a/src/H5api_adpt.h b/src/H5api_adpt.h
index 740eab5..182ae25 100644
--- a/src/H5api_adpt.h
+++ b/src/H5api_adpt.h
@@ -21,6 +21,272 @@
#ifndef H5API_ADPT_H
#define H5API_ADPT_H
+/* This will only be defined if HDF5 was built with CMake */
+#ifdef H5_BUILT_AS_DYNAMIC_LIB
+
+#if defined (hdf5_EXPORTS)
+ #define _HDF5DLL_
+#else
+ #define _HDF5USEDLL_
+#endif
+
+#if defined (hdf5_test_EXPORTS)
+ #define _HDF5TESTDLL_
+#else
+ #define _HDF5TESTUSEDLL_
+#endif
+
+#if defined (hdf5_tools_EXPORTS)
+ #define _HDF5TOOLSDLL_
+#else
+ #define _HDF5TOOLSUSEDLL_
+#endif
+
+#if defined (hdf5_cpp_EXPORTS)
+ #define HDF5_CPPDLL_EXPORTS
+#else
+ #define HDF5CPP_USEDLL
+#endif
+
+#if defined (hdf5_hl_EXPORTS)
+ #define _HDF5_HLDLL_EXPORTS_
+#else
+ #define _HDF5USEHLDLL_
+#endif
+
+#if defined (hdf5_hl_cpp_EXPORTS)
+ #define HDF5_HL_CPPDLL_EXPORTS
+#else
+ #define HDF5USE_HLCPPDLL
+#endif
+
+#if defined (hdf5_f90CStub_EXPORTS)
+ #define HDF5FORT_CSTUB_DLL_EXPORTS
+#else
+ #define HDF5FORT_CSTUB_USELL
+#endif
+
+#if defined (hdf5_test_f90CStub_EXPORTS)
+ #define HDF5FORTTEST_CSTUB_DLL_EXPORTS
+#endif
+
+#if defined (hdf5_hl_f90CStub_EXPORTS)
+ #define HDF5_HL_F90CSTUBDLL_EXPORTS
+#endif
+
+#if defined(hdf5_EXPORTS)
+ #if defined (_MSC_VER) /* MSVC Compiler Case */
+ #define H5_DLL __declspec(dllexport)
+ #define H5_DLLVAR extern __declspec(dllexport)
+ #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
+ #define H5_DLL __attribute__ ((visibility("default")))
+ #define H5_DLLVAR extern __attribute__ ((visibility("default")))
+ #endif
+#else
+ #if defined (_MSC_VER) /* MSVC Compiler Case */
+ #define H5_DLL __declspec(dllimport)
+ #define H5_DLLVAR __declspec(dllimport)
+ #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
+ #define H5_DLL __attribute__ ((visibility("default")))
+ #define H5_DLLVAR extern __attribute__ ((visibility("default")))
+ #endif
+#endif
+
+#ifndef H5_DLL
+ #define H5_DLL
+ #define H5_DLLVAR extern
+#endif /* _HDF5DLL_ */
+
+#if defined(hdf5_test_EXPORTS)
+ #if defined (_MSC_VER) /* MSVC Compiler Case */
+ #define H5TEST_DLL __declspec(dllexport)
+ #define H5TEST_DLLVAR extern __declspec(dllexport)
+ #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
+ #define H5TEST_DLL __attribute__ ((visibility("default")))
+ #define H5TEST_DLLVAR extern __attribute__ ((visibility("default")))
+ #endif
+#else
+ #if defined (_MSC_VER) /* MSVC Compiler Case */
+ #define H5TEST_DLL __declspec(dllimport)
+ #define H5TEST_DLLVAR __declspec(dllimport)
+ #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
+ #define H5TEST_DLL __attribute__ ((visibility("default")))
+ #define H5TEST_DLLVAR extern __attribute__ ((visibility("default")))
+ #endif
+#endif
+
+#ifndef H5TEST_DLL
+ #define H5TEST_DLL
+ #define H5TEST_DLLVAR extern
+#endif /* H5TEST_DLL */
+
+#if defined(hdf5_tools_EXPORTS)
+ #if defined (_MSC_VER) /* MSVC Compiler Case */
+ #define H5TOOLS_DLL __declspec(dllexport)
+ #define H5TOOLS_DLLVAR extern __declspec(dllexport)
+ #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
+ #define H5TOOLS_DLL __attribute__ ((visibility("default")))
+ #define H5TOOLS_DLLVAR extern __attribute__ ((visibility("default")))
+ #endif
+#else
+ #if defined (_MSC_VER) /* MSVC Compiler Case */
+ #define H5TOOLS_DLL __declspec(dllimport)
+ #define H5TOOLS_DLLVAR __declspec(dllimport)
+ #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
+ #define H5TOOLS_DLL __attribute__ ((visibility("default")))
+ #define H5TOOLS_DLLVAR extern __attribute__ ((visibility("default")))
+ #endif
+#endif
+
+#ifndef H5TOOLS_DLL
+ #define H5TOOLS_DLL
+ #define H5TOOLS_DLLVAR extern
+#endif /* H5TOOLS_DLL */
+
+#if defined(hdf5_cpp_EXPORTS)
+ #if defined (_MSC_VER) /* MSVC Compiler Case */
+ #define H5_DLLCPP __declspec(dllexport)
+ #define H5_DLLCPPVAR extern __declspec(dllexport)
+ #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
+ #define H5_DLLCPP __attribute__ ((visibility("default")))
+ #define H5_DLLCPPVAR extern __attribute__ ((visibility("default")))
+ #endif
+#else
+ #if defined (_MSC_VER) /* MSVC Compiler Case */
+ #define H5_DLLCPP __declspec(dllimport)
+ #define H5_DLLCPPVAR __declspec(dllimport)
+ #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
+ #define H5_DLLCPP __attribute__ ((visibility("default")))
+ #define H5_DLLCPPVAR extern __attribute__ ((visibility("default")))
+ #endif
+#endif
+
+#ifndef H5_DLLCPP
+ #define H5_DLLCPP
+ #define H5_DLLCPPVAR extern
+#endif /* H5_DLLCPP */
+
+#if defined(hdf5_hl_EXPORTS)
+ #if defined (_MSC_VER) /* MSVC Compiler Case */
+ #define H5_HLDLL __declspec(dllexport)
+ #define H5_HLDLLVAR extern __declspec(dllexport)
+ #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
+ #define H5_HLDLL __attribute__ ((visibility("default")))
+ #define H5_HLDLLVAR extern __attribute__ ((visibility("default")))
+ #endif
+#else
+ #if defined (_MSC_VER) /* MSVC Compiler Case */
+ #define H5_HLDLL __declspec(dllimport)
+ #define H5_HLDLLVAR __declspec(dllimport)
+ #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
+ #define H5_HLDLL __attribute__ ((visibility("default")))
+ #define H5_HLDLLVAR extern __attribute__ ((visibility("default")))
+ #endif
+#endif
+
+#ifndef H5_HLDLL
+ #define H5_HLDLL
+ #define H5_HLDLLVAR extern
+#endif /* H5_HLDLL */
+
+#if defined(hdf5_hl_cpp_EXPORTS)
+ #if defined (_MSC_VER) /* MSVC Compiler Case */
+ #define H5_HLCPPDLL __declspec(dllexport)
+ #define H5_HLCPPDLLVAR extern __declspec(dllexport)
+ #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
+ #define H5_HLCPPDLL __attribute__ ((visibility("default")))
+ #define H5_HLCPPDLLVAR extern __attribute__ ((visibility("default")))
+ #endif
+#else
+ #if defined (_MSC_VER) /* MSVC Compiler Case */
+ #define H5_HLCPPDLL __declspec(dllimport)
+ #define H5_HLCPPDLLVAR __declspec(dllimport)
+ #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
+ #define H5_HLCPPDLL __attribute__ ((visibility("default")))
+ #define H5_HLCPPDLLVAR extern __attribute__ ((visibility("default")))
+ #endif
+#endif
+
+#ifndef H5_HLCPPDLL
+ #define H5_HLCPPDLL
+ #define H5_HLCPPDLLVAR extern
+#endif /* H5_HLCPPDLL */
+
+#if defined(hdf5_f90CStub_EXPORTS)
+ #if defined (_MSC_VER) /* MSVC Compiler Case */
+ #define H5_FCDLL __declspec(dllexport)
+ #define H5_FCDLLVAR extern __declspec(dllexport)
+ #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
+ #define H5_FCDLL __attribute__ ((visibility("default")))
+ #define H5_FCDLLVAR extern __attribute__ ((visibility("default")))
+ #endif
+#else
+ #if defined (_MSC_VER) /* MSVC Compiler Case */
+ #define H5_FCDLL __declspec(dllimport)
+ #define H5_FCDLLVAR __declspec(dllimport)
+ #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
+ #define H5_FCDLL __attribute__ ((visibility("default")))
+ #define H5_FCDLLVAR extern __attribute__ ((visibility("default")))
+ #endif
+#endif
+
+#ifndef H5_FCDLL
+ #define H5_FCDLL
+ #define H5_FCDLLVAR extern
+#endif /* H5_FCDLL */
+
+#if defined(hdf5_f90Ctest_EXPORTS)
+ #if defined (_MSC_VER) /* MSVC Compiler Case */
+ #define H5_FCTESTDLL __declspec(dllexport)
+ #define H5_FCTESTDLLVAR extern __declspec(dllexport)
+ #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
+ #define H5_FCTESTDLL __attribute__ ((visibility("default")))
+ #define H5_FCTESTDLLVAR extern __attribute__ ((visibility("default")))
+ #endif
+#else
+ #if defined (_MSC_VER) /* MSVC Compiler Case */
+ #define H5_FCTESTDLL __declspec(dllimport)
+ #define H5_FCTESTDLLVAR __declspec(dllimport)
+ #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
+ #define H5_FCTESTDLL __attribute__ ((visibility("default")))
+ #define H5_FCTESTDLLVAR extern __attribute__ ((visibility("default")))
+ #endif
+#endif
+
+#ifndef H5_FCTESTDLL
+ #define H5_FCTESTDLL
+ #define H5_FCTESTDLLVAR extern
+#endif /* H5_FCTESTDLL */
+
+#if defined(hdf5_hl_f90CStub_EXPORTS)
+ #if defined (_MSC_VER) /* MSVC Compiler Case */
+ #define HDF5_HL_F90CSTUBDLL __declspec(dllexport)
+ #define HDF5_HL_F90CSTUBDLLVAR extern __declspec(dllexport)
+ #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
+ #define HDF5_HL_F90CSTUBDLL __attribute__ ((visibility("default")))
+ #define HDF5_HL_F90CSTUBDLLVAR extern __attribute__ ((visibility("default")))
+ #endif
+#else
+ #if defined (_MSC_VER) /* MSVC Compiler Case */
+ #define HDF5_HL_F90CSTUBDLL __declspec(dllimport)
+ #define HDF5_HL_F90CSTUBDLLVAR __declspec(dllimport)
+ #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
+ #define HDF5_HL_F90CSTUBDLL __attribute__ ((visibility("default")))
+ #define HDF5_HL_F90CSTUBDLLVAR extern __attribute__ ((visibility("default")))
+ #endif
+#endif
+
+#ifndef HDF5_HL_F90CSTUBDLL
+ #define HDF5_HL_F90CSTUBDLL
+ #define HDF5_HL_F90CSTUBDLLVAR extern
+#endif /* HDF5_HL_F90CSTUBDLL */
+
+#else
+/* This is the original HDFGroup defined preprocessor code which should still work
+ * with the VS projects that are maintained by "The HDF Group"
+ * This will be removed after the next release.
+ */
+
#if defined(_WIN32)
#if defined(_HDF5DLL_)
@@ -47,6 +313,18 @@
#define H5TEST_DLLVAR extern
#endif /* _HDF5TESTDLL_ */
+#if defined(_HDF5TOOLSDLL_)
+#pragma warning(disable: 4273) /* Disable the dll linkage warnings */
+#define H5TOOLS_DLL __declspec(dllexport)
+#define H5TOOLS_DLLVAR extern __declspec(dllexport)
+#elif defined(_HDF5TOOLSUSEDLL_)
+#define H5TOOLS_DLL __declspec(dllimport)
+#define H5TOOLS_DLLVAR __declspec(dllimport)
+#else
+#define H5TOOLS_DLL
+#define H5TOOLS_DLLVAR extern
+#endif /* _HDF5TOOLSDLL_ */
+
#if defined(_HDF5_HLDLL_EXPORTS_)
#pragma warning(disable: 4273) /* Disable the dll linkage warnings */
#define H5_HLDLL __declspec(dllexport)
@@ -117,6 +395,8 @@
#define H5_DLLCPP
#define H5TEST_DLL
#define H5TEST_DLLVAR extern
+#define H5TOOLS_DLL
+#define H5TOOLS_DLLVAR extern
#define H5_FCDLL
#define H5_FCDLLVAR extern
#define H5_FCTESTDLL
@@ -125,3 +405,4 @@
#endif /* H5API_ADPT_H */
+#endif /* */