summaryrefslogtreecommitdiffstats
path: root/config/cmake
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2012-03-29 16:47:26 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2012-03-29 16:47:26 (GMT)
commitb8cb145bdfc10c7b3fcaf7a05bda4605a7d32533 (patch)
tree45cf4d20c4c02bf0d718e40b29796cecbc792b60 /config/cmake
parent03ee4aa0eecf1a87d0d0da2454c532a38e37a38e (diff)
downloadhdf5-b8cb145bdfc10c7b3fcaf7a05bda4605a7d32533.zip
hdf5-b8cb145bdfc10c7b3fcaf7a05bda4605a7d32533.tar.gz
hdf5-b8cb145bdfc10c7b3fcaf7a05bda4605a7d32533.tar.bz2
[svn-r22186] MinGW compile issues fixed.
Tested: windows (big test using stdio only fails - this will be filed for further investigation)
Diffstat (limited to 'config/cmake')
-rwxr-xr-xconfig/cmake/CTestCustom.cmake6
-rw-r--r--config/cmake/ConfigureChecks.cmake16
-rw-r--r--config/cmake/H5pubconf.h.in3
-rw-r--r--config/cmake/HDFLibMacros.cmake63
4 files changed, 61 insertions, 27 deletions
diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake
index 786008f..c29cc60 100755
--- a/config/cmake/CTestCustom.cmake
+++ b/config/cmake/CTestCustom.cmake
@@ -2,11 +2,13 @@ SET (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 1500)
SET (CTEST_CUSTOM_WARNING_EXCEPTION
${CTEST_CUSTOM_WARNING_EXCEPTION}
- "H5detect.c.[0-9]+.[ \t]*:[ \t]*warning C4090"
+ "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 a2dd62e..930f3a9 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)
@@ -302,7 +308,7 @@ IF (NOT WINDOWS)
IF (HDF5_ENABLE_LARGE_FILE)
SET (msg "Performing TEST_LFS_WORKS")
TRY_RUN (TEST_LFS_WORKS_RUN TEST_LFS_WORKS_COMPILE
- ${CMAKE_BINARY_DIR}
+ ${HDF5_BINARY_DIR}/CMake
${HDF5_RESOURCES_DIR}/HDF5Tests.c
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=-DTEST_LFS_WORKS
OUTPUT_VARIABLE OUTPUT
@@ -615,7 +621,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)
@@ -673,7 +680,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/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index 70c6e50..a87efd1 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..dcf911b 100644
--- a/config/cmake/HDFLibMacros.cmake
+++ b/config/cmake/HDFLibMacros.cmake
@@ -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
@@ -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
@@ -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