Introduce TensorFlow 1.12 source package (#2785)
author박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Wed, 9 Jan 2019 00:21:40 +0000 (09:21 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Wed, 9 Jan 2019 00:21:40 +0000 (09:21 +0900)
This commit integrates TensorFlowSource (1.12) package into nncc build
system.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
cmake/packages/TensorFlowSource-1.12/TensorFlowSourceConfig.cmake [new file with mode: 0644]
cmake/packages/TensorFlowSource-1.12/TensorFlowSourceConfigVersion.cmake [new file with mode: 0644]

diff --git a/cmake/packages/TensorFlowSource-1.12/TensorFlowSourceConfig.cmake b/cmake/packages/TensorFlowSource-1.12/TensorFlowSourceConfig.cmake
new file mode 100644 (file)
index 0000000..b3adef0
--- /dev/null
@@ -0,0 +1,18 @@
+function(_TensorFlowSource_import)
+  if(NOT DOWNLOAD_TENSORFLOW)
+    set(TensorFlowSource_FOUND FALSE PARENT_SCOPE)
+    return()
+  endif(NOT DOWNLOAD_TENSORFLOW)
+
+  nncc_include(ExternalSourceTools)
+  nncc_include(OptionTools)
+
+  envoption(TENSORFLOW_1_12_URL https://github.com/tensorflow/tensorflow/archive/v1.12.0.tar.gz)
+
+  ExternalSource_Download(TENSORFLOW DIRNAME TENSORFLOW-1.12 ${TENSORFLOW_1_12_URL})
+
+  set(TensorFlowSource_DIR ${TENSORFLOW_SOURCE_DIR} PARENT_SCOPE)
+  set(TensorFlowSource_FOUND TRUE PARENT_SCOPE)
+endfunction(_TensorFlowSource_import)
+
+_TensorFlowSource_import()
diff --git a/cmake/packages/TensorFlowSource-1.12/TensorFlowSourceConfigVersion.cmake b/cmake/packages/TensorFlowSource-1.12/TensorFlowSourceConfigVersion.cmake
new file mode 100644 (file)
index 0000000..8cfdbf8
--- /dev/null
@@ -0,0 +1,10 @@
+set(PACKAGE_VERSION "1.12")
+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)