diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2019-07-23 21:21:47 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2019-07-23 21:21:47 (GMT) |
commit | d3fdcd8a680ad0f8b21304b35e8564b774a88ef0 (patch) | |
tree | 7eaf482abb38de0349b7844ed6f9e04de88f438d /src | |
parent | 6add0919d1dd737a7d9a2da25079d761a85f282e (diff) | |
parent | e19b0302cc38d1850ada7a00431511343cddc8a6 (diff) | |
download | hdf5-d3fdcd8a680ad0f8b21304b35e8564b774a88ef0.zip hdf5-d3fdcd8a680ad0f8b21304b35e8564b774a88ef0.tar.gz hdf5-d3fdcd8a680ad0f8b21304b35e8564b774a88ef0.tar.bz2 |
Merge pull request #1807 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit 'e19b0302cc38d1850ada7a00431511343cddc8a6': (31 commits)
HDFFV-10845 update note
Correct format of drive check
Use generator expr to get correct name
HDFFV-10845 Allow mingw to find functionality
HDFFV-10845 fix comment syntax
HDFFV-10845 Windows drive can only goto Z
HDFFV-10845 make flags private
Correct java load library name access
Correct syntax
Fix typo
Correct OUTPUT_NAME usage
CMake generator expr cannot be used in get_property cmd
HDFFV-1045 gcc static must be link flags
HDFFV-10845 quote multiple strings in cmake link command
HDFFV-10845 update mingw cmake changes
Add missing target root path, check other export macro
HDFFV-10845 skip test if CMake command doesn't support ignore EOL
HDFFV-10845 copy files with windows EOL
HDFFV-10845 separate test used by copy windows files
HDFFV-10845 mingw needs special windows reference files
...
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/H5win32defs.h | 18 |
2 files changed, 14 insertions, 12 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a0a10a5..4106515 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -973,7 +973,7 @@ if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c) target_compile_definitions(H5detect PUBLIC ${HDF_EXTRA_C_FLAGS} ${HDF_EXTRA_FLAGS}) TARGET_C_PROPERTIES (H5detect STATIC) target_link_libraries (H5detect - PRIVATE "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>" $<$<PLATFORM_ID:Windows>:ws2_32.lib> + PRIVATE "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>" $<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:MinGW>>:ws2_32.lib> PRIVATE $<$<PLATFORM_ID:Emscripten>:"-O0"> ) @@ -1014,7 +1014,7 @@ if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c) add_custom_command ( OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1 - COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR}$<TARGET_FILE:H5detect> + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5detect> ARGS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c COMMAND ${CMAKE_COMMAND} ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1 @@ -1063,14 +1063,14 @@ target_include_directories (H5make_libsettings PRIVATE "${HDF5_SRC_DIR};${HDF5_B target_compile_definitions(H5make_libsettings PUBLIC ${HDF_EXTRA_C_FLAGS} ${HDF_EXTRA_FLAGS}) TARGET_C_PROPERTIES (H5make_libsettings STATIC) target_link_libraries (H5make_libsettings - PRIVATE "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>" $<$<PLATFORM_ID:Windows>:ws2_32.lib> + PRIVATE "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>" $<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:MinGW>>:ws2_32.lib> PRIVATE $<$<PLATFORM_ID:Emscripten>:"-O0"> ) add_custom_command ( OUTPUT ${HDF5_BINARY_DIR}/H5lib_settings.c ${HDF5_BINARY_DIR}/gen_SRCS.stamp2 - COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR}$<TARGET_FILE:H5make_libsettings> + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5make_libsettings> ARGS ${HDF5_BINARY_DIR}/H5lib_settings.c COMMAND ${CMAKE_COMMAND} ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp2 diff --git a/src/H5win32defs.h b/src/H5win32defs.h index 2ae2575..29533dd 100644 --- a/src/H5win32defs.h +++ b/src/H5win32defs.h @@ -52,7 +52,11 @@ typedef __int64 h5_stat_size_t; /* Note that the variadic HDopen macro is using a VC++ extension * where the comma is dropped if nothing is passed to the ellipsis. */ +#ifndef H5_HAVE_MINGW #define HDopen(S,F,...) Wopen_utf8(S,F,__VA_ARGS__) +#else +#define HDopen(S,F,...) Wopen_utf8(S,F,##__VA_ARGS__) +#endif #define HDread(F,M,Z) _read(F,M,Z) #define HDremove(S) Wremove_utf8(S) #define HDrmdir(S) _rmdir(S) @@ -65,13 +69,6 @@ typedef __int64 h5_stat_size_t; #define HDtzset() _tzset() #define HDunlink(S) _unlink(S) #define HDwrite(F,M,Z) _write(F,M,Z) -#if (_MSC_VER < 1800) -/* va_copy() does not exist on pre-2013 Visual Studio. Since va_lists are - * just pointers into the stack in those CRTs, the usual work-around - * is to just define the operation as a pointer copy. - */ -#define HDva_copy(D,S) ((D) = (S)) -#endif /* MSC_VER < 1800 */ #ifdef H5_HAVE_VISUAL_STUDIO @@ -82,6 +79,11 @@ typedef __int64 h5_stat_size_t; #ifndef H5_HAVE_STRTOULL #define HDstrtoull(S,R,N) _strtoui64(S,R,N) #endif /* H5_HAVE_STRTOULL */ + /* va_copy() does not exist on pre-2013 Visual Studio. Since va_lists are + * just pointers into the stack in those CRTs, the usual work-around + * is to just define the operation as a pointer copy. + */ + #define HDva_copy(D,S) ((D) = (S)) #endif /* MSC_VER < 1800 */ /* @@ -128,7 +130,7 @@ extern "C" { H5_DLL int Wnanosleep(const struct timespec *req, struct timespec *rem); H5_DLL herr_t H5_expand_windows_env_vars(char **env_var); H5_DLL const wchar_t *H5_get_utf16_str(const char *s); - H5_DLL int Wopen_utf8(const char *path, int oflag, ...); + H5_DLL int Wopen_utf8(const char *path, int oflag, ...); H5_DLL int Wremove_utf8(const char *path); /* Round functions only needed for VS2012 and earlier. |