diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/H5api_adpt.h | 189 |
2 files changed, 14 insertions, 183 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 999420c..68f7847 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -771,14 +771,14 @@ set (H5_PRIVATE_HEADERS # specific type checks inside #----------------------------------------------------------------------------- #add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c) -#TARGET_C_PROPERTIES (H5detect " " " ") +#TARGET_C_PROPERTIES (H5detect STATIC " " " ") IF (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) SET (LOCAL_OPT_FLAG "-O0") ELSE (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) SET (LOCAL_OPT_FLAG " ") ENDIF (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) ADD_EXECUTABLE (H5detect ${HDF5_SRC_DIR}/H5detect.c) -TARGET_C_PROPERTIES (H5detect ${LOCAL_OPT_FLAG} " ") +TARGET_C_PROPERTIES (H5detect STATIC ${LOCAL_OPT_FLAG} " ") if (MSVC OR MINGW) target_link_libraries (H5detect "ws2_32.lib") @@ -793,7 +793,7 @@ add_custom_command ( ) add_executable (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c) -TARGET_C_PROPERTIES (H5make_libsettings " " " ") +TARGET_C_PROPERTIES (H5make_libsettings STATIC " " " ") if (MSVC OR MINGW) target_link_libraries (H5make_libsettings "ws2_32.lib") endif (MSVC OR MINGW) @@ -860,7 +860,7 @@ set (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5overflow.h) set_source_files_properties (${HDF5_BINARY_DIR}/H5overflow.h GENERATED) add_library (${HDF5_LIB_TARGET} ${LIB_TYPE} ${common_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS}) -TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} " " " ") +TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} ${LIB_TYPE} " " " ") target_link_libraries (${HDF5_LIB_TARGET} ${LINK_LIBS}) if (NOT WIN32) target_link_libraries (${HDF5_LIB_TARGET} dl) diff --git a/src/H5api_adpt.h b/src/H5api_adpt.h index 845a9a0..9b00bd9 100644 --- a/src/H5api_adpt.h +++ b/src/H5api_adpt.h @@ -24,56 +24,6 @@ /* 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_USEDLL -#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) @@ -281,144 +231,25 @@ #define HDF5_HL_F90CSTUBDLLVAR extern #endif /* HDF5_HL_F90CSTUBDLL */ -#elif defined(H5_BUILT_AS_STATIC_LIB) +#else #define H5_DLL - #define H5_HLDLL - #define H5_HLCPPDLL - #define HDF5_HL_F90CSTUBDLL #define H5_DLLVAR extern - #define H5_DLLCPP #define H5TEST_DLL #define H5TEST_DLLVAR extern #define H5TOOLS_DLL #define H5TOOLS_DLLVAR extern + #define H5_DLLCPP + #define H5_DLLCPPVAR extern + #define H5_HLDLL + #define H5_HLDLLVAR extern + #define H5_HLCPPDLL + #define H5_HLCPPDLLVAR extern #define H5_FCDLL #define H5_FCDLLVAR extern #define H5_FCTESTDLL #define H5_FCTESTDLLVAR extern - -#else -/* This is the original HDFGroup defined preprocessor code which should still work - * with the VS projects that are maintained by "The HDF Group" - * The Visual Studio project files will not be supported in the next major release of 1.10. - */ - -#if defined(H5_HAVE_WIN32_API) - -#if defined(_HDF5DLL_) -#pragma warning(disable: 4273) /* Disable the dll linkage warnings */ -#define H5_DLL __declspec(dllexport) -#define H5_DLLVAR extern __declspec(dllexport) -#elif defined(_HDF5USEDLL_) -#define H5_DLL __declspec(dllimport) -#define H5_DLLVAR __declspec(dllimport) -#else -#define H5_DLL -#define H5_DLLVAR extern -#endif /* _HDF5DLL_ */ - -#if defined(_HDF5TESTDLL_) -#pragma warning(disable: 4273) /* Disable the dll linkage warnings */ -#define H5TEST_DLL __declspec(dllexport) -#define H5TEST_DLLVAR extern __declspec(dllexport) -#elif defined(_HDF5TESTUSEDLL_) -#define H5TEST_DLL __declspec(dllimport) -#define H5TEST_DLLVAR __declspec(dllimport) -#else -#define H5TEST_DLL -#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) -#elif defined(_HDF5USEHLDLL_) -#define H5_HLDLL __declspec(dllimport) -#else -#define H5_HLDLL -#endif /* _HDF5_HLDLL_EXPORTS */ - -#if defined(HDF5_HL_CPPDLL_EXPORTS) -#pragma warning(disable: 4273) /* Disable the dll linkage warnings */ -#define H5_HLCPPDLL __declspec(dllexport) -#elif defined(HDF5USE_HLCPPDLL) -#define H5_HLCPPDLL __declspec(dllimport) -#else -#define H5_HLCPPDLL -#endif /*HDF5_HL_CPPDLL_EXPORTS*/ - -#if defined(HDF5_HL_F90CSTUBDLL_EXPORTS) -#pragma warning(disable: 4273) /* Disable the dll linkage warnings */ -#define HDF5_HL_F90CSTUBDLL __declspec(dllexport) -#elif defined(HDF5USE_HLF90CSTUBDLL) -#define HDF5_HL_F90CSTUBDLL __declspec(dllimport) -#else -#define HDF5_HL_F90CSTUBDLL -#endif /*HDF5_HL_F90CSTUBDLL_EXPORTS*/ - - -#if defined(HDF5FORT_CSTUB_DLL_EXPORTS) -#pragma warning(disable: 4273) /* Disable the dll linkage warnings */ -#define H5_FCDLL __declspec(dllexport) -#define H5_FCDLLVAR extern __declspec(dllexport) -#elif defined(HDF5FORT_CSTUB_USEDLL) -#define H5_FCDLL __declspec(dllimport) -#define H5_FCDLLVAR __declspec(dllimport) -#else -#define H5_FCDLL -#define H5_FCDLLVAR extern -#endif /* _HDF5_FORTRANDLL_EXPORTS_ */ - -#if defined(HDF5FORTTEST_CSTUB_DLL_EXPORTS) -#pragma warning(disable: 4273) /* Disable the dll linkage warnings */ -#define H5_FCTESTDLL __declspec(dllexport) -#define H5_FCTESTDLLVAR extern __declspec(dllexport) -#elif defined(HDF5FORTTEST_CSTUB_USEDLL) -#define H5_FCTESTDLL __declspec(dllimport) -#define H5_FCTESTDLLVAR __declspec(dllimport) -#else -#define H5_FCTESTDLL -#define H5_FCTESTDLLVAR extern -#endif /* _HDF5_FORTRANDLL_EXPORTS_ */ - -/* Added to export or to import C++ APIs - BMR (02-15-2002) */ -#if defined(HDF5_CPPDLL_EXPORTS) /* this name is generated at creation */ -#define H5_DLLCPP __declspec(dllexport) -#elif defined(HDF5CPP_USEDLL) -#define H5_DLLCPP __declspec(dllimport) -#else -#define H5_DLLCPP -#endif /* HDF5_CPPDLL_EXPORTS */ - -#else /*H5_HAVE_WIN32_API*/ -#define H5_DLL -#define H5_HLDLL -#define H5_HLCPPDLL -#define HDF5_HL_F90CSTUBDLL -#define H5_DLLVAR extern -#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 -#define H5_FCTESTDLLVAR extern -#endif /*H5_HAVE_WIN32_API*/ + #define HDF5_HL_F90CSTUBDLL + #define HDF5_HL_F90CSTUBDLLVAR extern +#endif /* H5_BUILT_AS_DYNAMIC_LIB */ #endif /* H5API_ADPT_H */ - -#endif /* */ |