Hello!

So far I have managed to build HDF5 library with statically-linked C runtime by specifying

cmake -G "Visual Studio 12" -DBUILD_SHARED_LIBS=ON -DCMAKE_C_FLAGS_RELEASE="/MT /O2 /Ob2 /D NDEBUG" hdf5-1.8.13

followed by

cmake --build . --config Release

However, if I tell cmake to include zlib support (e.g. HDF5_ALLOW_EXTERNAL_SUPPORT=SVN), CMAKE_C_FLAGS_RELEASE doesn't propagate to zlib build configuration. Also, I couldn't find out so far how to link zlib statically. CMake experts help really appreciated.

----

While experimenting with different build options, I've found out the following (minor) problems in HDF5 build files:

1) Line 20 in CMakeFilters.cmake should be changed from

option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO SVN TGZ)" "NO")

to

set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO SVN TGZ)")
SET_PROPERTY(CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO SVN TGZ)

because HDF5_ALLOW_EXTERNAL_SUPPORT is a tri-value, not a boolean. It fixes configuration display in cmake-gui.

2) Currently, HDF5 cannot be built under MinGW because _In_ is not defined under MinGW (H5.c, line 857). Quick workaround is to remove the "_In_"s.
It is proposed to conditionally #define _In_ to no-op if it's not #defined.

Best wishes,
Andrey Paramonov


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Reply via email to