IVGCVSW-7435 Making optional some CL code in Acl Common.

* Some code was moved to aclcommon to facilitate GpuFsa. It causes
  build problems when ACL is build without CL support.

Signed-off-by: Colm Donelan <colm.donelan@arm.com>
Change-Id: Ia49d1fb7e69aaa8a694f402968e9ae689c2a874c
diff --git a/src/backends/aclCommon/CMakeLists.txt b/src/backends/aclCommon/CMakeLists.txt
index b3bf89e..eaaed65 100644
--- a/src/backends/aclCommon/CMakeLists.txt
+++ b/src/backends/aclCommon/CMakeLists.txt
@@ -8,14 +8,19 @@
     ArmComputeTensorHandle.hpp
     ArmComputeTensorUtils.hpp
     ArmComputeTensorUtils.cpp
-    ArmComputeTuningUtils.hpp
-    ArmComputeTuningUtils.cpp
     ArmComputeUtils.hpp
     BaseMemoryManager.cpp
     BaseMemoryManager.hpp
     IClTensorHandle.hpp
 )
 
+if(ARMCOMPUTECL)
+    list(APPEND armnnAclCommon_sources
+        ArmComputeTuningUtils.hpp
+        ArmComputeTuningUtils.cpp
+    )
+endif()
+
 if(BUILD_UNIT_TESTS)
     add_subdirectory(test)
 endif()
diff --git a/src/backends/aclCommon/common.mk b/src/backends/aclCommon/common.mk
index b113269..a5ef900 100644
--- a/src/backends/aclCommon/common.mk
+++ b/src/backends/aclCommon/common.mk
@@ -1,5 +1,5 @@
 #
-# Copyright © 2017 ARM Ltd. All rights reserved.
+# Copyright © 2017,2023 Arm Ltd and Contributors.  All rights reserved.
 # SPDX-License-Identifier: MIT
 #
 
@@ -9,9 +9,13 @@
 
 COMMON_SOURCES := \
     ArmComputeTensorUtils.cpp \
-    ArmComputeTuningUtils.cpp \
     BaseMemoryManager.cpp
 
+ifeq ($(ARMNN_COMPUTE_CL_ENABLED),1)
+COMMON_SOURCES += \
+    ArmComputeTuningUtils.cpp
+endif # ARMNN_COMPUTE_CL_ENABLED == 1
+
 # COMMON_TEST_SOURCES contains the list of files to be included
 # in the Android unit test build (armnn-tests) and it is picked
 # up by the Android.mk file in the root of ArmNN