From e971d5199a0782ca6bcf3ea46f3728a06e55cc02 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=9D=B4=EC=83=81=EA=B7=9C/On-Device=20Lab=28SR=29/Princip?= =?utf8?q?al=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Fri, 23 Aug 2019 04:10:25 -0400 Subject: [PATCH] [nnpkg-run] fix x86_64 build error (#6880) We've used hdf5 static linking to avoid work for installing hdf5 for all CI slaves. However, it causes build error on x86_64. Thus, this patch makes x86_64 use shared library to fix this error. Signed-off-by: Sanggyu Lee --- tests/tools/nnpackage_run/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/tools/nnpackage_run/CMakeLists.txt b/tests/tools/nnpackage_run/CMakeLists.txt index 4d4343a..00b8938 100644 --- a/tests/tools/nnpackage_run/CMakeLists.txt +++ b/tests/tools/nnpackage_run/CMakeLists.txt @@ -6,7 +6,10 @@ if(NOT BUILD_NEURUN) return() endif(NOT BUILD_NEURUN) -set(HDF5_USE_STATIC_LIBRARIES ON) +if (CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l") + # use static linking to avoid installing hdf5 library on existing arm CI slaves. + set(HDF5_USE_STATIC_LIBRARIES ON) +endif (CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l") nnfw_find_package(HDF5 QUIET) if(NOT HDF5_FOUND) message(WARNING "HDF5 NOT found. Install libhdf5-dev to build nnpackage_run.") -- 2.7.4