From 731a2185d1e1253610ec669fbe0153b3331085ab Mon Sep 17 00:00:00 2001 From: yejianwu Date: Mon, 16 Jul 2018 11:20:39 +0800 Subject: [PATCH] fix linking error in cpu runtime --- mace/libmace/mace_runtime.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mace/libmace/mace_runtime.cc b/mace/libmace/mace_runtime.cc index d070e5c6..45ae962c 100644 --- a/mace/libmace/mace_runtime.cc +++ b/mace/libmace/mace_runtime.cc @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "mace/core/macros.h" #include "mace/core/file_storage.h" #include "mace/core/runtime/cpu/cpu_runtime.h" #include "mace/public/mace_runtime.h" @@ -70,7 +71,11 @@ void SetOpenCLBinaryPaths(const std::vector &paths) { extern std::string kOpenCLParameterPath; void SetOpenCLParameterPath(const std::string &path) { +#ifdef MACE_ENABLE_OPENCL kOpenCLParameterPath = path; +#else + MACE_UNUSED(path); +#endif // MACE_ENABLE_OPENCL } void SetGPUHints(GPUPerfHint gpu_perf_hint, GPUPriorityHint gpu_priority_hint) { -- GitLab