blob: 63a9ccdd00fe8a5578aa257a4f0a05cdd6942604 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
function(_FlatBuffersSource_import)
if(NOT DOWNLOAD_FLATBUFFERS)
set(FlatBuffersSource_FOUND FALSE PARENT_SCOPE)
return()
endif(NOT DOWNLOAD_FLATBUFFERS)
nncc_include(ExternalSourceTools)
nncc_include(OptionTools)
# Each TensorFlow needs a specific version of Flatbuffers
# - TensorFlow 1.7 downloads it from https://github.com/google/flatbuffers/archive/971a68110e4.tar.gz
# - TensorFlow 1.12 downloads it from https://github.com/google/flatbuffers/archive/1f5eae5d6a1.tar.gz
#
# Let's use 1.10 released in 2018.10 (compatible with 1f5eae5d6a1).
#
# TODO Manage multiple versions
envoption(FLATBUFFERS_URL https://github.com/google/flatbuffers/archive/v1.10.0.tar.gz)
ExternalSource_Download(FLATBUFFERS ${FLATBUFFERS_URL})
set(FlatBuffersSource_DIR ${FLATBUFFERS_SOURCE_DIR} PARENT_SCOPE)
set(FlatBuffersSource_FOUND TRUE PARENT_SCOPE)
endfunction(_FlatBuffersSource_import)
_FlatBuffersSource_import()
|