FindHDF5: HDF5_DEFINITIONS can be incorrect
When using _HDF5_parse_compile_line, HDF5_C_DEFINITIONS etc are set without the -D option. On my Lubuntu version 15.10 this leads it to be set to
_LARGEFILE64_SOURCE;_LARGEFILE_SOURCE;_FORTIFY_SOURCE=2
This then causes a compilation problem when using
add_definitions(${HDF5_DEFINITIONS})
I can fix this by adjusting FindHDF5.cmake L361 to include the -D flag, i.e.
old:
elseif("${arg}" MATCHES "^-D(.*)$")
# compile definition
list(APPEND ${definitions} "-D${CMAKE_MATCH_1}"
fixed:
elseif("${arg}" MATCHES "^-D(.*)$")
# compile definition
list(APPEND ${definitions} "-D${CMAKE_MATCH_1}")