Matthew Sloyan | ac001ee | 2021-02-03 10:43:04 +0000 | [diff] [blame] | 1 | # |
| 2 | # Copyright © 2021 Arm Ltd and Contributors. All rights reserved. |
| 3 | # SPDX-License-Identifier: MIT |
| 4 | # |
| 5 | |
| 6 | # Read the CaffeParser version components from file |
| 7 | file(READ ${CMAKE_CURRENT_LIST_DIR}/../include/armnnCaffeParser/Version.hpp caffeVersion) |
| 8 | |
| 9 | # Parse the CaffeParser version components |
| 10 | string(REGEX MATCH "#define CAFFE_PARSER_MAJOR_VERSION ([0-9]*)" _ ${caffeVersion}) |
| 11 | set(CAFFE_PARSER_MAJOR_VERSION ${CMAKE_MATCH_1}) |
| 12 | string(REGEX MATCH "#define CAFFE_PARSER_MINOR_VERSION ([0-9]*)" _ ${caffeVersion}) |
| 13 | set(CAFFE_PARSER_MINOR_VERSION ${CMAKE_MATCH_1}) |
| 14 | |
| 15 | # Define LIB version |
| 16 | set(CAFFE_PARSER_LIB_VERSION "${CAFFE_PARSER_MAJOR_VERSION}.${CAFFE_PARSER_MINOR_VERSION}") |
| 17 | |
| 18 | # Define LIB soversion |
| 19 | set(CAFFE_PARSER_LIB_SOVERSION "${CAFFE_PARSER_MAJOR_VERSION}") |
| 20 | |
| 21 | |
| 22 | # Read the OnnxParser version components from file |
| 23 | file(READ ${CMAKE_CURRENT_LIST_DIR}/../include/armnnOnnxParser/Version.hpp onnxVersion) |
| 24 | |
| 25 | # Parse the OnnxParser version components |
| 26 | string(REGEX MATCH "#define ONNX_PARSER_MAJOR_VERSION ([0-9]*)" _ ${onnxVersion}) |
| 27 | set(ONNX_PARSER_MAJOR_VERSION ${CMAKE_MATCH_1}) |
| 28 | string(REGEX MATCH "#define ONNX_PARSER_MINOR_VERSION ([0-9]*)" _ ${onnxVersion}) |
| 29 | set(ONNX_PARSER_MINOR_VERSION ${CMAKE_MATCH_1}) |
| 30 | |
| 31 | # Define LIB version |
| 32 | set(ONNX_PARSER_LIB_VERSION "${ONNX_PARSER_MAJOR_VERSION}.${ONNX_PARSER_MINOR_VERSION}") |
| 33 | |
| 34 | # Define LIB soversion |
| 35 | set(ONNX_PARSER_LIB_SOVERSION "${ONNX_PARSER_MAJOR_VERSION}") |
| 36 | |
| 37 | |
| 38 | # Read the TfLiteParser version components from file |
| 39 | file(READ ${CMAKE_CURRENT_LIST_DIR}/../include/armnnTfLiteParser/Version.hpp tfLiteVersion) |
| 40 | |
| 41 | # Parse the TfLiteParser version components |
| 42 | string(REGEX MATCH "#define TFLITE_PARSER_MAJOR_VERSION ([0-9]*)" _ ${tfLiteVersion}) |
| 43 | set(TFLITE_PARSER_MAJOR_VERSION ${CMAKE_MATCH_1}) |
| 44 | string(REGEX MATCH "#define TFLITE_PARSER_MINOR_VERSION ([0-9]*)" _ ${tfLiteVersion}) |
| 45 | set(TFLITE_PARSER_MINOR_VERSION ${CMAKE_MATCH_1}) |
| 46 | |
| 47 | # Define LIB version |
| 48 | set(TFLITE_PARSER_LIB_VERSION "${TFLITE_PARSER_MAJOR_VERSION}.${TFLITE_PARSER_MINOR_VERSION}") |
| 49 | |
| 50 | # Define LIB soversion |
| 51 | set(TFLITE_PARSER_LIB_SOVERSION "${TFLITE_PARSER_MAJOR_VERSION}") |
| 52 | |
| 53 | |
| 54 | # Read the TfParser version components from file |
| 55 | file(READ ${CMAKE_CURRENT_LIST_DIR}/../include/armnnTfParser/Version.hpp tfVersion) |
| 56 | |
| 57 | # Parse the TfParser version components |
| 58 | string(REGEX MATCH "#define TF_PARSER_MAJOR_VERSION ([0-9]*)" _ ${tfVersion}) |
| 59 | set(TF_PARSER_MAJOR_VERSION ${CMAKE_MATCH_1}) |
| 60 | string(REGEX MATCH "#define TF_PARSER_MINOR_VERSION ([0-9]*)" _ ${tfVersion}) |
| 61 | set(TF_PARSER_MINOR_VERSION ${CMAKE_MATCH_1}) |
| 62 | |
| 63 | # Define LIB version |
| 64 | set(TF_PARSER_LIB_VERSION "${TF_PARSER_MAJOR_VERSION}.${TF_PARSER_MINOR_VERSION}") |
| 65 | |
| 66 | # Define LIB soversion |
| 67 | set(TF_PARSER_LIB_SOVERSION "${TF_PARSER_MAJOR_VERSION}") |