aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorTeresa Charlin <teresa.charlinreyes@arm.com>2022-02-16 12:57:19 +0000
committerTeresa Charlin <teresa.charlinreyes@arm.com>2022-03-01 16:58:08 +0000
commit62fdf0c64834cd5e45d19528de08c5005044c858 (patch)
treea7fb306380e0afc5867b5e0925e90acd36c22cc2 /cmake
parentc17679249e43174fc18551b718121c75d933a718 (diff)
downloadarmnn-62fdf0c64834cd5e45d19528de08c5005044c858.tar.gz
IVGCVSW-6602 Put ArmnnTestUtils under abi-compliance checking.
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I82f3bd99b3c1d4d8a013b1e987a533a8071fbeea
Diffstat (limited to 'cmake')
-rw-r--r--cmake/ArmnnTestUtilsVersion.cmake18
1 files changed, 18 insertions, 0 deletions
diff --git a/cmake/ArmnnTestUtilsVersion.cmake b/cmake/ArmnnTestUtilsVersion.cmake
new file mode 100644
index 0000000000..38fcb97c82
--- /dev/null
+++ b/cmake/ArmnnTestUtilsVersion.cmake
@@ -0,0 +1,18 @@
+#
+# Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
+# SPDX-License-Identifier: MIT
+#
+
+# Read the ArmNN armnnTestUtils version components from file
+file(READ ${CMAKE_CURRENT_LIST_DIR}/../include/armnnTestUtils/Version.hpp armnnTestUtilsVersion)
+
+# Parse the ArmNN armnnTestUtils version components
+string(REGEX MATCH "#define ARMNN_TEST_UTILS_MAJOR_VERSION ([0-9]*)" _ ${armnnTestUtilsVersion})
+set(ARMNN_TEST_UTILS_MAJOR_VERSION ${CMAKE_MATCH_1})
+string(REGEX MATCH "#define ARMNN_TEST_UTILS_MINOR_VERSION ([0-9]*)" _ ${armnnTestUtilsVersion})
+set(ARMNN_TEST_UTILS_MINOR_VERSION ${CMAKE_MATCH_1})
+
+# Define LIB version
+set(ARMNN_TEST_UTILS_LIB_VERSION "${ARMNN_TEST_UTILS_MAJOR_VERSION}.${ARMNN_TEST_UTILS_MINOR_VERSION}")
+# Define LIB soversion
+set(ARMNN_TEST_UTILS_LIB_SOVERSION "${ARMNN_TEST_UTILS_MAJOR_VERSION}") \ No newline at end of file