From 282c9fa74c43adeb9388a9780c31e06dd6ab6a85 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9=20=D0=91=D0=B0=D1=80?= =?utf8?q?=D0=B0=D0=BD=D0=BD=D0=B8=D0=BA=D0=BE=D0=B2/AI=20Tools=20Lab=20/S?= =?utf8?q?RR/Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Tue, 20 Aug 2019 16:06:39 +0900 Subject: [PATCH] Add ONNX sources v1.5 (#6642) Add a cmake configs for fetching ONNX v1.5 sources. Signed-off-by: Sergei Barannikov --- .../packages/ONNXSource-1.5.0/ONNXSourceConfig.cmake | 20 ++++++++++++++++++++ .../ONNXSource-1.5.0/ONNXSourceConfigVersion.cmake | 10 ++++++++++ 2 files changed, 30 insertions(+) create mode 100644 infra/nncc/cmake/packages/ONNXSource-1.5.0/ONNXSourceConfig.cmake create mode 100644 infra/nncc/cmake/packages/ONNXSource-1.5.0/ONNXSourceConfigVersion.cmake diff --git a/infra/nncc/cmake/packages/ONNXSource-1.5.0/ONNXSourceConfig.cmake b/infra/nncc/cmake/packages/ONNXSource-1.5.0/ONNXSourceConfig.cmake new file mode 100644 index 0000000..7f890e9 --- /dev/null +++ b/infra/nncc/cmake/packages/ONNXSource-1.5.0/ONNXSourceConfig.cmake @@ -0,0 +1,20 @@ +function(_ONNXSource_import) + if(NOT DOWNLOAD_ONNX) + set(ONNXSource_FOUND FALSE PARENT_SCOPE) + return() + endif(NOT DOWNLOAD_ONNX) + + nncc_include(ExternalSourceTools) + nncc_include(OptionTools) + + envoption(ONNX_1_5_0_URL https://github.com/onnx/onnx/archive/v1.5.0.zip) + + ExternalSource_Download(ONNX DIRNAME ONNX-1.5.0 + CHECKSUM MD5=1a5fe554569a3819705b26de33d8fe02 + URL ${ONNX_1_5_0_URL}) + + set(ONNXSource_DIR ${ONNX_SOURCE_DIR} PARENT_SCOPE) + set(ONNXSource_FOUND TRUE PARENT_SCOPE) +endfunction(_ONNXSource_import) + +_ONNXSource_import() diff --git a/infra/nncc/cmake/packages/ONNXSource-1.5.0/ONNXSourceConfigVersion.cmake b/infra/nncc/cmake/packages/ONNXSource-1.5.0/ONNXSourceConfigVersion.cmake new file mode 100644 index 0000000..70b2804 --- /dev/null +++ b/infra/nncc/cmake/packages/ONNXSource-1.5.0/ONNXSourceConfigVersion.cmake @@ -0,0 +1,10 @@ +set(PACKAGE_VERSION "1.5.0") +set(PACKAGE_VERSION_EXACT FALSE) +set(PACKAGE_VERSION_COMPATIBLE FALSE) +set(PACKAGE_VERSION_UNSUITABLE TRUE) + +if(PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION) + set(PACKAGE_VERSION_EXACT TRUE) + set(PACKAGE_VERSION_COMPATIBLE TRUE) + set(PACKAGE_VERSION_UNSUITABLE FALSE) +endif(PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION) -- 2.7.4