diff options
Diffstat (limited to 'config/cmake')
-rwxr-xr-x | config/cmake/CTestCustom.cmake | 3 | ||||
-rw-r--r-- | config/cmake/ConfigureChecks.cmake | 16 | ||||
-rw-r--r-- | config/cmake/FindSZIP.cmake | 18 | ||||
-rw-r--r-- | config/cmake/H5pubconf.h.in | 3 | ||||
-rw-r--r-- | config/cmake/HDFLibMacros.cmake | 87 | ||||
-rw-r--r-- | config/cmake/HDFMacros.cmake | 16 |
6 files changed, 87 insertions, 56 deletions
diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake index 43ef451..e708a00 100755 --- a/config/cmake/CTestCustom.cmake +++ b/config/cmake/CTestCustom.cmake @@ -5,9 +5,10 @@ SET (CTEST_CUSTOM_WARNING_EXCEPTION "H5detect.c.[0-9]+.[ \t]*:[ \t]*warning C4090:" "H5detect.c.[0-9]+.[ \t]*:[ \t]*warning:[ \t]*passing argument" "H5detect.c[0-9 \t:]*warning:[ \t]*passing argument" + "H5detect.c[0-9 \t:]*note:[ \t]*expected .void .. but argument is of type .volatile" + "include/string.h[0-9 \t:]*note:[ \t]*expected .void .. but argument is of type .volatile" "note:[ \t]*expected .void .. but argument is of type .volatile" "H5Tconv.c[0-9 \t:]*warning:[ \t]*comparison is always false due to limited range of data type" - "testhdf5.h.[0-9]+.[ \t]*:[ \t]*warning C4005" "H5Ztrans.c.[0-9]+.[ \t]*:[ \t]*warning C4244" "SZIP.src.*:[ \t]*warning" "POSIX name for this item is deprecated" diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 963152c..0a078b6 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -129,6 +129,10 @@ ENDMACRO (CHECK_LIBRARY_EXISTS_CONCAT) SET (WINDOWS) IF (WIN32) + IF (MINGW) + SET (H5_HAVE_MINGW 1) + SET (WINDOWS 1) # MinGW tries to imitate Windows + ENDIF (MINGW) SET (H5_HAVE_WIN32_API 1) IF (NOT UNIX AND NOT CYGWIN AND NOT MINGW) SET (WINDOWS 1) @@ -174,7 +178,9 @@ IF (WINDOWS) SET (H5_HAVE_DIFFTIME 1) SET (H5_HAVE_LONGJMP 1) SET (H5_STDC_HEADERS 1) - SET (H5_HAVE_GETHOSTNAME 1) + IF (NOT MINGW) + SET (H5_HAVE_GETHOSTNAME 1) + ENDIF (NOT MINGW) SET (H5_HAVE_GETCONSOLESCREENBUFFERINFO 1) SET (H5_HAVE_FUNCTION 1) SET (H5_GETTIMEOFDAY_GIVES_TZ 1) @@ -295,7 +301,6 @@ ENDIF (H5_HAVE_STDINT_H AND CMAKE_CXX_COMPILER_LOADED) SET (LINUX_LFS 0) SET (HDF5_EXTRA_FLAGS) -#IF (CMAKE_SYSTEM MATCHES "Linux-([3-9]\\.[0-9]|2\\.[4-9])\\.") IF (NOT WINDOWS) # Linux Specific flags SET (HDF5_EXTRA_FLAGS -D_POSIX_SOURCE -D_BSD_SOURCE) @@ -331,7 +336,6 @@ IF (NOT WINDOWS) ENDIF (HDF5_ENABLE_LARGE_FILE) SET (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${HDF5_EXTRA_FLAGS}) ENDIF (NOT WINDOWS) -#ENDIF (CMAKE_SYSTEM MATCHES "Linux-([3-9]\\.[0-9]|2\\.[4-9])\\.") ADD_DEFINITIONS (${HDF5_EXTRA_FLAGS}) @@ -632,7 +636,8 @@ ENDIF (NOT WINDOWS) #----------------------------------------------------------------------------- # Check if InitOnceExecuteOnce is available #----------------------------------------------------------------------------- -IF (WINDOWS AND NOT HDF5_NO_IOEO_TEST) +IF (WINDOWS) + IF (NOT HDF5_NO_IOEO_TEST) MESSAGE (STATUS "Checking for InitOnceExecuteOnce:") IF("${H5_HAVE_IOEO}" MATCHES "^${H5_HAVE_IOEO}$") IF (LARGEFILE) @@ -690,7 +695,8 @@ IF (WINDOWS AND NOT HDF5_NO_IOEO_TEST) "Return value: ${HAVE_IOEO_EXITCODE}\n") ENDIF("${HAVE_IOEO_EXITCODE}" EQUAL 0) ENDIF("${H5_HAVE_IOEO}" MATCHES "^${H5_HAVE_IOEO}$") -ENDIF (WINDOWS AND NOT HDF5_NO_IOEO_TEST) + ENDIF (NOT HDF5_NO_IOEO_TEST) +ENDIF (WINDOWS) #----------------------------------------------------------------------------- diff --git a/config/cmake/FindSZIP.cmake b/config/cmake/FindSZIP.cmake index 6118f7a..b358862 100644 --- a/config/cmake/FindSZIP.cmake +++ b/config/cmake/FindSZIP.cmake @@ -44,11 +44,11 @@ MACRO (SZIP_ADJUST_LIB_VARS basename) # if the generator supports configuration types then set # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) - SET (${basename}_LIBRARY optimized ${${basename}_LIBRARY_RELEASE} debug ${${basename}_LIBRARY_DEBUG}) + SET (${basename}_LIBRARY optimized ${${basename}_LIBRARY_RELEASE} debug ${${basename}_LIBRARY_DEBUG}) ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) - # if there are no configuration types and CMAKE_BUILD_TYPE has no value - # then just use the release libraries - SET (${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} ) + # if there are no configuration types and CMAKE_BUILD_TYPE has no value + # then just use the release libraries + SET (${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} ) ENDIF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) SET (${basename}_LIBRARIES optimized ${${basename}_LIBRARY_RELEASE} debug ${${basename}_LIBRARY_DEBUG}) ENDIF (${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE) @@ -90,13 +90,13 @@ FIND_PATH (SZIP_INCLUDE_DIR NO_DEFAULT_PATH ) -IF (WIN32 AND NOT MINGW) +IF (WIN32) SET (SZIP_SEARCH_DEBUG_NAMES "sz_d;libsz_d") - SET (SZIP_SEARCH_RELEASE_NAMES "sz;libsz") -ELSE (WIN32 AND NOT MINGW) + SET (SZIP_SEARCH_RELEASE_NAMES "sz;libsz;libszip") +ELSE (WIN32) SET (SZIP_SEARCH_DEBUG_NAMES "sz_d") - SET (SZIP_SEARCH_RELEASE_NAMES "sz") -ENDIF (WIN32 AND NOT MINGW) + SET (SZIP_SEARCH_RELEASE_NAMES "sz;szip") +ENDIF (WIN32) # Look for the library. FIND_LIBRARY (SZIP_LIBRARY_DEBUG diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index b2567b5..80406a3 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -6,6 +6,9 @@ /* Define if the Windows virtual file driver should be compiled */ #cmakedefine H5_HAVE_WINDOWS @H5_HAVE_WINDOWS@ +/* Define if using MinGW */ +#cmakedefine H5_HAVE_MINGW @H5_HAVE_MINGW@ + /* Define if on the Windows platform and default WIN32 API */ #cmakedefine H5_HAVE_WIN32_API @H5_HAVE_WIN32_API@ diff --git a/config/cmake/HDFLibMacros.cmake b/config/cmake/HDFLibMacros.cmake index 23c81da..b9c1fbb 100644 --- a/config/cmake/HDFLibMacros.cmake +++ b/config/cmake/HDFLibMacros.cmake @@ -37,11 +37,11 @@ MACRO (EXTERNAL_JPEG_LIBRARY compress_type libtype jpeg_pic) EXTERNALPROJECT_GET_PROPERTY (JPEG BINARY_DIR SOURCE_DIR) IF (${CMAKE_BUILD_TYPE} MATCHES "Debug") - IF (WIN32 AND NOT MINGW) + IF (WIN32) SET (JPEG_LIB_NAME "jpeg_D") - ELSE (WIN32 AND NOT MINGW) + ELSE (WIN32) SET (JPEG_LIB_NAME "jpeg_debug") - ENDIF (WIN32 AND NOT MINGW) + ENDIF (WIN32) ELSE (${CMAKE_BUILD_TYPE} MATCHES "Debug") SET (JPEG_LIB_NAME "jpeg") ENDIF (${CMAKE_BUILD_TYPE} MATCHES "Debug") @@ -51,12 +51,19 @@ MACRO (EXTERNAL_JPEG_LIBRARY compress_type libtype jpeg_pic) ADD_DEPENDENCIES (jpeg JPEG) IF (${libtype} MATCHES "SHARED") - IF (WIN32 AND NOT MINGW) - SET_TARGET_PROPERTIES(jpeg PROPERTIES - IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${JPEG_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}" - IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${JPEG_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" - ) - ELSE (WIN32 AND NOT MINGW) + IF (WIN32) + IF (MINGW) + SET_TARGET_PROPERTIES(jpeg PROPERTIES + IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${JPEG_LIB_NAME}.lib" + IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${JPEG_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" + ) + ELSE (MINGW) + SET_TARGET_PROPERTIES(jpeg PROPERTIES + IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${JPEG_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}" + IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${JPEG_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" + ) + ENDIF (MINGW) + ELSE (WIN32) IF (CYGWIN) SET_TARGET_PROPERTIES(jpeg PROPERTIES IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${JPEG_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}" @@ -69,7 +76,7 @@ MACRO (EXTERNAL_JPEG_LIBRARY compress_type libtype jpeg_pic) SOVERSION "${JPEG_VERSION_STRING}" ) ENDIF (CYGWIN) - ENDIF (WIN32 AND NOT MINGW) + ENDIF (WIN32) ELSE (${libtype} MATCHES "SHARED") IF (WIN32 AND NOT MINGW) SET_TARGET_PROPERTIES(jpeg PROPERTIES @@ -144,11 +151,11 @@ MACRO (EXTERNAL_SZIP_LIBRARY compress_type libtype encoding) EXTERNALPROJECT_GET_PROPERTY (SZIP BINARY_DIR SOURCE_DIR) IF (${CMAKE_BUILD_TYPE} MATCHES "Debug") - IF (WIN32 AND NOT MINGW) + IF (WIN32) SET (SZIP_LIB_NAME "szip_D") - ELSE (WIN32 AND NOT MINGW) + ELSE (WIN32) SET (SZIP_LIB_NAME "szip_debug") - ENDIF (WIN32 AND NOT MINGW) + ENDIF (WIN32) ELSE (${CMAKE_BUILD_TYPE} MATCHES "Debug") SET (SZIP_LIB_NAME "szip") ENDIF (${CMAKE_BUILD_TYPE} MATCHES "Debug") @@ -158,12 +165,19 @@ MACRO (EXTERNAL_SZIP_LIBRARY compress_type libtype encoding) ADD_DEPENDENCIES (szip SZIP) IF (${libtype} MATCHES "SHARED") - IF (WIN32 AND NOT MINGW) - SET_TARGET_PROPERTIES(szip PROPERTIES - IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${SZIP_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}" - IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${SZIP_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" - ) - ELSE (WIN32 AND NOT MINGW) + IF (WIN32) + IF (MINGW) + SET_TARGET_PROPERTIES(szip PROPERTIES + IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${SZIP_LIB_NAME}.lib" + IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${SZIP_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" + ) + ELSE (MINGW) + SET_TARGET_PROPERTIES(szip PROPERTIES + IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${SZIP_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}" + IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${SZIP_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" + ) + ENDIF (MINGW) + ELSE (WIN32) IF (CYGWIN) SET_TARGET_PROPERTIES(szip PROPERTIES IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${SZIP_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}" @@ -176,7 +190,7 @@ MACRO (EXTERNAL_SZIP_LIBRARY compress_type libtype encoding) SOVERSION "${SZIP_VERSION_STRING}" ) ENDIF (CYGWIN) - ENDIF (WIN32 AND NOT MINGW) + ENDIF (WIN32) ELSE (${libtype} MATCHES "SHARED") IF (WIN32 AND NOT MINGW) SET_TARGET_PROPERTIES(szip PROPERTIES @@ -249,17 +263,17 @@ MACRO (EXTERNAL_ZLIB_LIBRARY compress_type libtype) EXTERNALPROJECT_GET_PROPERTY (ZLIB BINARY_DIR SOURCE_DIR) IF (${CMAKE_BUILD_TYPE} MATCHES "Debug") - IF (WIN32 AND NOT MINGW) + IF (WIN32) SET (ZLIB_LIB_NAME "zlib_D") - ELSE (WIN32 AND NOT MINGW) + ELSE (WIN32) SET (ZLIB_LIB_NAME "z_debug") - ENDIF (WIN32 AND NOT MINGW) + ENDIF (WIN32) ELSE (${CMAKE_BUILD_TYPE} MATCHES "Debug") - IF (WIN32 AND NOT MINGW) + IF (WIN32) SET (ZLIB_LIB_NAME "zlib") - ELSE (WIN32 AND NOT MINGW) + ELSE (WIN32) SET (ZLIB_LIB_NAME "z") - ENDIF (WIN32 AND NOT MINGW) + ENDIF (WIN32) ENDIF (${CMAKE_BUILD_TYPE} MATCHES "Debug") # Create imported target szip @@ -267,12 +281,19 @@ MACRO (EXTERNAL_ZLIB_LIBRARY compress_type libtype) ADD_DEPENDENCIES (zlib ZLIB) IF (${libtype} MATCHES "SHARED") - IF (WIN32 AND NOT MINGW) - SET_TARGET_PROPERTIES(zlib PROPERTIES - IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}" - IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" - ) - ELSE (WIN32 AND NOT MINGW) + IF (WIN32) + IF (MINGW) + SET_TARGET_PROPERTIES(zlib PROPERTIES + IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${ZLIB_LIB_NAME}.lib" + IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${ZLIB_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" + ) + ELSE (MINGW) + SET_TARGET_PROPERTIES(zlib PROPERTIES + IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}" + IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" + ) + ENDIF (MINGW) + ELSE (WIN32) IF (CYGWIN) SET_TARGET_PROPERTIES(zlib PROPERTIES IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}" @@ -285,7 +306,7 @@ MACRO (EXTERNAL_ZLIB_LIBRARY compress_type libtype) SOVERSION "${ZLIB_VERSION_STRING}" ) ENDIF (CYGWIN) - ENDIF (WIN32 AND NOT MINGW) + ENDIF (WIN32) ELSE (${libtype} MATCHES "SHARED") IF (WIN32 AND NOT MINGW) SET_TARGET_PROPERTIES(zlib PROPERTIES diff --git a/config/cmake/HDFMacros.cmake b/config/cmake/HDFMacros.cmake index 6a1ead7..0d3ab5f 100644 --- a/config/cmake/HDFMacros.cmake +++ b/config/cmake/HDFMacros.cmake @@ -35,29 +35,29 @@ ENDMACRO (IDE_SOURCE_PROPERTIES) #------------------------------------------------------------------------------- MACRO (TARGET_NAMING target libtype) - IF (WIN32 AND NOT MINGW) + IF (WIN32) IF (${libtype} MATCHES "SHARED") SET_TARGET_PROPERTIES (${target} PROPERTIES OUTPUT_NAME "${target}dll") ENDIF (${libtype} MATCHES "SHARED") - ENDIF (WIN32 AND NOT MINGW) + ENDIF (WIN32) ENDMACRO (TARGET_NAMING) #------------------------------------------------------------------------------- MACRO (HDF_SET_LIB_OPTIONS libtarget libname libtype) # message (STATUS "${libname} libtype: ${libtype}") IF (${libtype} MATCHES "SHARED") - IF (WIN32 AND NOT MINGW) + IF (WIN32) SET (LIB_RELEASE_NAME "${libname}") SET (LIB_DEBUG_NAME "${libname}_D") - ELSE (WIN32 AND NOT MINGW) + ELSE (WIN32) SET (LIB_RELEASE_NAME "${libname}") SET (LIB_DEBUG_NAME "${libname}_debug") - ENDIF (WIN32 AND NOT MINGW) + ENDIF (WIN32) ELSE (${libtype} MATCHES "SHARED") - IF (WIN32 AND NOT MINGW) + IF (WIN32) SET (LIB_RELEASE_NAME "lib${libname}") SET (LIB_DEBUG_NAME "lib${libname}_D") - ELSE (WIN32 AND NOT MINGW) + ELSE (WIN32) # if the generator supports configuration types or if the CMAKE_BUILD_TYPE has a value IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) SET (LIB_RELEASE_NAME "${libname}") @@ -66,7 +66,7 @@ MACRO (HDF_SET_LIB_OPTIONS libtarget libname libtype) SET (LIB_RELEASE_NAME "lib${libname}") SET (LIB_DEBUG_NAME "lib${libname}_debug") ENDIF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) - ENDIF (WIN32 AND NOT MINGW) + ENDIF (WIN32) ENDIF (${libtype} MATCHES "SHARED") SET_TARGET_PROPERTIES (${libtarget} |