Github #275 Improved getting ArmNN's version at compile time
* The version macro is set in the Version.hpp just like before,
so parsing it from file is no longer necessary
!armnn:2090
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
Change-Id: I3f8d10bd7b8947f9361e50edf033ea4e93451faf
diff --git a/Android.mk b/Android.mk
index cbc093c..66e651d 100644
--- a/Android.mk
+++ b/Android.mk
@@ -37,11 +37,6 @@
OPENCL_HEADER_PATH := $(LOCAL_PATH)/clframework/include
NN_HEADER_PATH := $(LOCAL_PATH)/../../../frameworks/ml/nn/runtime/include
-# Get ArmNN's version from file
-get_version_number = $(shell sed -n 's/.*$1 *\([0-9*]\)/\1/p' $(LOCAL_PATH)/armnn/ArmnnVersion.txt)
-ARMNN_VERSION := 20$(call get_version_number,ARMNN_MAJOR_VERSION)$(call get_version_number,ARMNN_MINOR_VERSION)$(call get_version_number,ARMNN_PATCH_VERSION)
-$(info android-nn-driver ARMNN_VERSION: $(ARMNN_VERSION))
-
# Variables to control CL/NEON/reference backend support
# Set them to '0' to disable support for a specific backend
ARMNN_COMPUTE_CL_ENABLED := 1
@@ -87,8 +82,7 @@
-std=$(CPP_VERSION) \
-fexceptions \
-Werror \
- -Wno-format-security \
- -DARMNN_VERSION_FROM_FILE=$(ARMNN_VERSION)
+ -Wno-format-security
ifeq ($(P_OR_LATER),1)
# Required to build with the changes made to the Android ML framework starting from Android P,
@@ -211,7 +205,6 @@
-fexceptions \
-Werror \
-Wno-format-security \
- -DARMNN_VERSION_FROM_FILE=$(ARMNN_VERSION) \
-DARMNN_ANDROID_P \
-DARMNN_ANDROID_NN_V1_1
@@ -321,7 +314,6 @@
-fexceptions \
-Werror \
-Wno-format-security \
- -DARMNN_VERSION_FROM_FILE=$(ARMNN_VERSION) \
-DARMNN_ANDROID_Q \
-DARMNN_ANDROID_NN_V1_2
@@ -429,8 +421,7 @@
LOCAL_CFLAGS := \
-std=$(CPP_VERSION) \
- -fexceptions \
- -DARMNN_VERSION_FROM_FILE=$(ARMNN_VERSION)
+ -fexceptions
ifeq ($(ARMNN_DRIVER_DEBUG),1)
LOCAL_CFLAGS += \
@@ -522,7 +513,6 @@
LOCAL_CFLAGS := \
-std=$(CPP_VERSION) \
-fexceptions \
- -DARMNN_VERSION_FROM_FILE=$(ARMNN_VERSION) \
-DARMNN_ANDROID_NN_V1_1
ifeq ($(ARMNN_DRIVER_DEBUG),1)
@@ -607,7 +597,6 @@
LOCAL_CFLAGS := \
-std=$(CPP_VERSION) \
-fexceptions \
- -DARMNN_VERSION_FROM_FILE=$(ARMNN_VERSION) \
-DARMNN_ANDROID_NN_V1_2 \
-DBOOST_NO_AUTO_PTR