Issue summary
In order to cross-compile Caffe to run on an embedded system, all of the dependency libraries must also be cross-compiled. The HDF5 library does not natively support cross compiling, making automated cross-compilation of Caffe difficult.
I propose adding a USE_HDF5 flag. By default USE_HDF5=1. When USE_HDF5=0, the HDF5 layers are not built, and the HDF5 library is not linked. This would greatly simplify automated cross-compilation of Caffe with Yocto.
HDF5 Cross-Compiling
Steps to reproduce
Attempt to cross-compile Caffe using standard cross-compiling toolchain. It is very dificult.
Your system configuration
Operating system: Ubuntu 16.04 x86
Cross-Compiler: riscv64-unknown-linux-gnu-gcc