From 2624dd719a78d02e7500557d284191f90f7a707e Mon Sep 17 00:00:00 2001 From: Matthew Bentham Date: Wed, 20 May 2020 10:44:18 +0100 Subject: [PATCH] Find default build location for Compute Library binaries. In common cases this reduces the cmake arguments needed for Compute Library from: "cmake -DARMCOMPUTENEON=1 -DARMCOMPUTECL=1 -DARMCOMPUTE_ROOT=../ComputeLibrary -DARMCOMPUTE_BUILD_DIR=ARMCOMPUTE_BUILD_DIR=../ComputeLibrary/build -DSHARED_BOOST=1 ../armnn/" to: "cmake -DARMCOMPUTENEON=1 -DARMCOMPUTECL=1 -DARMCOMPUTE_ROOT=../ComputeLibrary -DSHARED_BOOST=1 ../armnn/" Signed-off-by: Matthew Bentham Change-Id: I992f4ef428f10dc92ca9457fe8981ae3af93f538 --- cmake/GlobalConfig.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/GlobalConfig.cmake b/cmake/GlobalConfig.cmake index 968642b..4e20cc7 100644 --- a/cmake/GlobalConfig.cmake +++ b/cmake/GlobalConfig.cmake @@ -238,6 +238,11 @@ if(ARMCOMPUTENEON OR ARMCOMPUTECL) # We link to the static variant so that customers don't need to find and build a compatible version of clframework. # First try the folders specified ARMCOMPUTE_BUILD_DIR (with PATH_SUFFIXES for # Windows builds) + if ((NOT DEFINED ARMCOMPUTE_BUILD_DIR) AND (DEFINED ARMCOMPUTE_ROOT)) + # Default build directory for ComputeLibrary is under the root + set(ARMCOMPUTE_BUILD_DIR ${ARMCOMPUTE_ROOT}/build) + endif() + find_library(ARMCOMPUTE_LIBRARY_DEBUG NAMES arm_compute-static PATHS ${ARMCOMPUTE_BUILD_DIR} PATH_SUFFIXES "Debug" -- 2.7.4