From ff51c1d334292e39eba5609522ced8b7eed14368 Mon Sep 17 00:00:00 2001 From: SaeHie Park Date: Fri, 1 Sep 2023 12:41:49 +0900 Subject: [PATCH] [infra] cmake for TensorFlowSource-2.12.1 (#11422) This will introduce cmake package to download TensorFlowSource-2.12.1. ONE-DCO-1.0-Signed-off-by: SaeHie Park --- .../TensorFlowSourceConfig.cmake | 19 +++++++++++++++++++ .../TensorFlowSourceConfigVersion.cmake | 10 ++++++++++ 2 files changed, 29 insertions(+) create mode 100644 infra/cmake/packages/TensorFlowSource-2.12.1/TensorFlowSourceConfig.cmake create mode 100644 infra/cmake/packages/TensorFlowSource-2.12.1/TensorFlowSourceConfigVersion.cmake diff --git a/infra/cmake/packages/TensorFlowSource-2.12.1/TensorFlowSourceConfig.cmake b/infra/cmake/packages/TensorFlowSource-2.12.1/TensorFlowSourceConfig.cmake new file mode 100644 index 00000000000..81fc6aecbcb --- /dev/null +++ b/infra/cmake/packages/TensorFlowSource-2.12.1/TensorFlowSourceConfig.cmake @@ -0,0 +1,19 @@ +function(_TensorFlowSource_import) + if(NOT DOWNLOAD_TENSORFLOW) + set(TensorFlowSource_FOUND FALSE PARENT_SCOPE) + return() + endif(NOT DOWNLOAD_TENSORFLOW) + + nnas_include(ExternalSourceTools) + nnas_include(OptionTools) + + envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com") + envoption(TENSORFLOW_2_12_1_URL ${EXTERNAL_DOWNLOAD_SERVER}/tensorflow/tensorflow/archive/v2.12.1.tar.gz) + + ExternalSource_Download(TENSORFLOW DIRNAME TENSORFLOW-2.12.1 ${TENSORFLOW_2_12_1_URL}) + + set(TensorFlowSource_DIR ${TENSORFLOW_SOURCE_DIR} PARENT_SCOPE) + set(TensorFlowSource_FOUND TRUE PARENT_SCOPE) +endfunction(_TensorFlowSource_import) + +_TensorFlowSource_import() diff --git a/infra/cmake/packages/TensorFlowSource-2.12.1/TensorFlowSourceConfigVersion.cmake b/infra/cmake/packages/TensorFlowSource-2.12.1/TensorFlowSourceConfigVersion.cmake new file mode 100644 index 00000000000..8566d081606 --- /dev/null +++ b/infra/cmake/packages/TensorFlowSource-2.12.1/TensorFlowSourceConfigVersion.cmake @@ -0,0 +1,10 @@ +set(PACKAGE_VERSION "2.12.1") +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)