diff options
Diffstat (limited to 'cmake/packages')
-rw-r--r-- | cmake/packages/ARMComputeConfig.cmake | 81 | ||||
-rw-r--r-- | cmake/packages/ARMComputeSourceConfig.cmake | 18 | ||||
-rw-r--r-- | cmake/packages/AbslSourceConfig.cmake | 19 | ||||
-rw-r--r-- | cmake/packages/EigenConfig.cmake | 17 | ||||
-rw-r--r-- | cmake/packages/EigenSourceConfig.cmake | 19 | ||||
-rw-r--r-- | cmake/packages/FarmhashSourceConfig.cmake | 19 | ||||
-rw-r--r-- | cmake/packages/FlatBuffersConfig.cmake | 77 | ||||
-rw-r--r-- | cmake/packages/FlatBuffersSourceConfig.cmake | 19 | ||||
-rw-r--r-- | cmake/packages/GEMMLowpSourceConfig.cmake | 19 | ||||
-rw-r--r-- | cmake/packages/GTestConfig.cmake | 49 | ||||
-rw-r--r-- | cmake/packages/NEON2SSESourceConfig.cmake | 19 | ||||
-rw-r--r-- | cmake/packages/NoniusConfig.cmake | 18 | ||||
-rw-r--r-- | cmake/packages/NoniusSourceConfig.cmake | 18 | ||||
-rw-r--r-- | cmake/packages/TensorFlowSourceConfig.cmake | 18 | ||||
-rw-r--r-- | cmake/packages/TensorflowConfig.cmake | 44 |
15 files changed, 0 insertions, 454 deletions
diff --git a/cmake/packages/ARMComputeConfig.cmake b/cmake/packages/ARMComputeConfig.cmake deleted file mode 100644 index 656163a8e..000000000 --- a/cmake/packages/ARMComputeConfig.cmake +++ /dev/null @@ -1,81 +0,0 @@ -function(_ARMCompute_Import) - nnfw_find_package(ARMComputeSource QUIET) - - if(NOT ARMComputeSource_FOUND) - set(ARMCompute_FOUND FALSE PARENT_SCOPE) - return() - endif(NOT ARMComputeSource_FOUND) - - include(FindPackageHandleStandardArgs) - - list(APPEND ARMCompute_INCLUDE_SEARCH_PATHS /usr/include) - - list(APPEND ARMCompute_LIB_SEARCH_PATHS /usr/lib) - - find_path(INCLUDE_DIR NAMES arm_compute/core/ITensor.h PATHS ${ARMCompute_INCLUDE_SEARCH_PATHS}) - - find_library(CORE_LIBRARY NAMES arm_compute_core PATHS ${ARMCompute_LIB_SEARCH_PATHS}) - find_library(RUNTIME_LIBRARY NAMES arm_compute PATHS ${ARMCompute_LIB_SEARCH_PATHS}) - find_library(GRAPH_LIBRARY NAMES arm_compute_graph PATHS ${ARMCompute_LIB_SEARCH_PATHS}) - - if(NOT INCLUDE_DIR) - set(INCLUDE_DIR ${CMAKE_SOURCE_DIR}/externals/acl ${CMAKE_SOURCE_DIR}/externals/acl/include) - endif(NOT INCLUDE_DIR) - - # NOTE '${CMAKE_INSTALL_PREFIX}/lib' should be searched as CI server places - # pre-built ARM compute libraries on this directory - if(NOT CORE_LIBRARY AND EXISTS ${CMAKE_INSTALL_PREFIX}/lib/libarm_compute_core.so) - set(CORE_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib/libarm_compute_core.so) - endif() - - if(NOT CORE_LIBRARY) - return() - set(ARMCompute_FOUND FALSE PARENT_SCOPE) - endif() - - if(NOT RUNTIME_LIBRARY AND EXISTS ${CMAKE_INSTALL_PREFIX}/lib/libarm_compute.so) - set(RUNTIME_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib/libarm_compute.so) - endif() - - if(NOT RUNTIME_LIBRARY) - return() - set(ARMCompute_FOUND FALSE PARENT_SCOPE) - endif() - - if(NOT GRAPH_LIBRARY AND EXISTS ${CMAKE_INSTALL_PREFIX}/lib/libarm_compute_graph.so) - set(GRAPH_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib/libarm_compute_graph.so) - endif() - - if(NOT GRAPH_LIBRARY) - return() - set(ARMCompute_FOUND FALSE PARENT_SCOPE) - endif() - - if(NOT TARGET arm_compute_core) - add_library(arm_compute_core INTERFACE) - target_include_directories(arm_compute_core INTERFACE ${INCLUDE_DIR}) - target_link_libraries(arm_compute_core INTERFACE dl ${LIB_PTHREAD}) - target_link_libraries(arm_compute_core INTERFACE ${CORE_LIBRARY}) - if (${TARGET_OS} STREQUAL "tizen") - target_link_libraries(arm_compute_core INTERFACE OpenCL) - endif() - endif(NOT TARGET arm_compute_core) - - if(NOT TARGET arm_compute) - add_library(arm_compute INTERFACE) - target_include_directories(arm_compute INTERFACE ${INCLUDE_DIR}) - target_link_libraries(arm_compute INTERFACE ${RUNTIME_LIBRARY}) - target_link_libraries(arm_compute INTERFACE arm_compute_core) - endif(NOT TARGET arm_compute) - - if(NOT TARGET arm_compute_graph) - add_library(arm_compute_graph INTERFACE) - target_include_directories(arm_compute_graph INTERFACE ${INCLUDE_DIR}) - target_link_libraries(arm_compute_graph INTERFACE ${GRAPH_LIBRARY}) - target_link_libraries(arm_compute_graph INTERFACE arm_compute) - endif(NOT TARGET arm_compute_graph) - - set(ARMCompute_FOUND TRUE PARENT_SCOPE) -endfunction(_ARMCompute_Import) - -_ARMCompute_Import() diff --git a/cmake/packages/ARMComputeSourceConfig.cmake b/cmake/packages/ARMComputeSourceConfig.cmake deleted file mode 100644 index c1a31d047..000000000 --- a/cmake/packages/ARMComputeSourceConfig.cmake +++ /dev/null @@ -1,18 +0,0 @@ -function(_ARMComputeSource_import) - if(NOT DOWNLOAD_ARMCOMPUTE) - set(ARMComputeSource_FOUND FALSE PARENT_SCOPE) - return() - endif(NOT DOWNLOAD_ARMCOMPUTE) - - nnfw_include(ExternalSourceTools) - nnfw_include(OptionTools) - - envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com") - set(ARMCOMPUTE_URL ${EXTERNAL_DOWNLOAD_SERVER}/ARM-software/ComputeLibrary/archive/v18.11.tar.gz) - ExternalSource_Download("acl" ${ARMCOMPUTE_URL}) - - set(ARMComputeSource_DIR ${acl_SOURCE_DIR} PARENT_SCOPE) - set(ARMComputeSource_FOUND TRUE PARENT_SCOPE) -endfunction(_ARMComputeSource_import) - -_ARMComputeSource_import() diff --git a/cmake/packages/AbslSourceConfig.cmake b/cmake/packages/AbslSourceConfig.cmake deleted file mode 100644 index 9075b7397..000000000 --- a/cmake/packages/AbslSourceConfig.cmake +++ /dev/null @@ -1,19 +0,0 @@ -function(_AbslSource_import) - if(NOT DOWNLOAD_ABSL) - set(AbslSource_FOUND FALSE PARENT_SCOPE) - return() - endif(NOT DOWNLOAD_ABSL) - - nnfw_include(ExternalSourceTools) - nnfw_include(OptionTools) - - # NOTE The following URL comes from TensorFlow 1.12 - envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com") - set(ABSL_URL ${EXTERNAL_DOWNLOAD_SERVER}/abseil/abseil-cpp/archive/48cd2c3f351ff188bc85684b84a91b6e6d17d896.tar.gz) - ExternalSource_Download("absl" ${ABSL_URL}) - - set(AbslSource_DIR ${absl_SOURCE_DIR} PARENT_SCOPE) - set(AbslSource_FOUND TRUE PARENT_SCOPE) -endfunction(_AbslSource_import) - -_AbslSource_import() diff --git a/cmake/packages/EigenConfig.cmake b/cmake/packages/EigenConfig.cmake deleted file mode 100644 index 0feb0890a..000000000 --- a/cmake/packages/EigenConfig.cmake +++ /dev/null @@ -1,17 +0,0 @@ -function(_Eigen_import) - nnfw_find_package(EigenSource QUIET) - - if(NOT EigenSource_FOUND) - set(Eigen_FOUND FALSE PARENT_SCOPE) - return() - endif(NOT EigenSource_FOUND) - - if(NOT TARGET eigen) - add_library(eigen INTERFACE) - target_include_directories(eigen INTERFACE "${EigenSource_DIR}") - endif(NOT TARGET eigen) - - set(Eigen_FOUND TRUE PARENT_SCOPE) -endfunction(_Eigen_import) - -_Eigen_import() diff --git a/cmake/packages/EigenSourceConfig.cmake b/cmake/packages/EigenSourceConfig.cmake deleted file mode 100644 index dd94e069e..000000000 --- a/cmake/packages/EigenSourceConfig.cmake +++ /dev/null @@ -1,19 +0,0 @@ -function(_EigenSource_import) - if(NOT DOWNLOAD_EIGEN) - set(EigenSource_FOUND FALSE PARENT_SCOPE) - return() - endif(NOT DOWNLOAD_EIGEN) - - nnfw_include(ExternalSourceTools) - nnfw_include(OptionTools) - - # NOTE TensorFlow 1.12 downloads Eign from the following URL - envoption(EXTERNAL_DOWNLOAD_SERVER "https://bitbucket.org") - set(EIGEN_URL ${EXTERNAL_DOWNLOAD_SERVER}/eigen/eigen/get/fd6845384b86.tar.gz) - ExternalSource_Download("eigen" ${EIGEN_URL}) - - set(EigenSource_DIR ${eigen_SOURCE_DIR} PARENT_SCOPE) - set(EigenSource_FOUND TRUE PARENT_SCOPE) -endfunction(_EigenSource_import) - -_EigenSource_import() diff --git a/cmake/packages/FarmhashSourceConfig.cmake b/cmake/packages/FarmhashSourceConfig.cmake deleted file mode 100644 index 802367968..000000000 --- a/cmake/packages/FarmhashSourceConfig.cmake +++ /dev/null @@ -1,19 +0,0 @@ -function(_FarmhashSource_import) - if(NOT DOWNLOAD_FARMHASH) - set(FarmhashSource_FOUND FALSE PARENT_SCOPE) - return() - endif(NOT DOWNLOAD_FARMHASH) - - nnfw_include(ExternalSourceTools) - nnfw_include(OptionTools) - - # NOTE TensorFlow 1.12 downloads farmhash from the following URL - envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com") - set(FARMHASH_URL ${EXTERNAL_DOWNLOAD_SERVER}/google/farmhash/archive/816a4ae622e964763ca0862d9dbd19324a1eaf45.tar.gz) - ExternalSource_Download("farmhash" ${FARMHASH_URL}) - - set(FarmhashSource_DIR ${farmhash_SOURCE_DIR} PARENT_SCOPE) - set(FarmhashSource_FOUND TRUE PARENT_SCOPE) -endfunction(_FarmhashSource_import) - -_FarmhashSource_import() diff --git a/cmake/packages/FlatBuffersConfig.cmake b/cmake/packages/FlatBuffersConfig.cmake deleted file mode 100644 index 064673158..000000000 --- a/cmake/packages/FlatBuffersConfig.cmake +++ /dev/null @@ -1,77 +0,0 @@ -function(_FlatBuffers_import) - nnfw_find_package(FlatBuffersSource QUIET) - - if(NOT FlatBuffersSource_FOUND) - set(FlatBuffers_FOUND FALSE PARENT_SCOPE) - return() - endif(NOT FlatBuffersSource_FOUND) - - # From FlatBuffers's CMakeLists.txt - list(APPEND FlatBuffers_Library_SRCS "${FlatBuffersSource_DIR}/src/code_generators.cpp") - list(APPEND FlatBuffers_Library_SRCS "${FlatBuffersSource_DIR}/src/idl_parser.cpp") - list(APPEND FlatBuffers_Library_SRCS "${FlatBuffersSource_DIR}/src/idl_gen_text.cpp") - list(APPEND FlatBuffers_Library_SRCS "${FlatBuffersSource_DIR}/src/reflection.cpp") - list(APPEND FlatBuffers_Library_SRCS "${FlatBuffersSource_DIR}/src/util.cpp") - - # From FlatBuffers's CMakeLists.txt - list(APPEND FlatBuffers_Compiler_SRCS "${FlatBuffersSource_DIR}/src/idl_gen_cpp.cpp") - list(APPEND FlatBuffers_Compiler_SRCS "${FlatBuffersSource_DIR}/src/idl_gen_dart.cpp") - list(APPEND FlatBuffers_Compiler_SRCS "${FlatBuffersSource_DIR}/src/idl_gen_fbs.cpp") - list(APPEND FlatBuffers_Compiler_SRCS "${FlatBuffersSource_DIR}/src/idl_gen_general.cpp") - list(APPEND FlatBuffers_Compiler_SRCS "${FlatBuffersSource_DIR}/src/idl_gen_go.cpp") - list(APPEND FlatBuffers_Compiler_SRCS "${FlatBuffersSource_DIR}/src/idl_gen_grpc.cpp") - list(APPEND FlatBuffers_Compiler_SRCS "${FlatBuffersSource_DIR}/src/idl_gen_js.cpp") - list(APPEND FlatBuffers_Compiler_SRCS "${FlatBuffersSource_DIR}/src/idl_gen_json_schema.cpp") - list(APPEND FlatBuffers_Compiler_SRCS "${FlatBuffersSource_DIR}/src/idl_gen_lobster.cpp") - list(APPEND FlatBuffers_Compiler_SRCS "${FlatBuffersSource_DIR}/src/idl_gen_lua.cpp") - list(APPEND FlatBuffers_Compiler_SRCS "${FlatBuffersSource_DIR}/src/idl_gen_php.cpp") - list(APPEND FlatBuffers_Compiler_SRCS "${FlatBuffersSource_DIR}/src/idl_gen_python.cpp") - list(APPEND FlatBuffers_Compiler_SRCS "${FlatBuffersSource_DIR}/src/flatc.cpp") - list(APPEND FlatBuffers_Compiler_SRCS "${FlatBuffersSource_DIR}/src/flatc_main.cpp") - list(APPEND FlatBuffers_Compiler_SRCS "${FlatBuffersSource_DIR}/grpc/src/compiler/cpp_generator.cc") - list(APPEND FlatBuffers_Compiler_SRCS "${FlatBuffersSource_DIR}/grpc/src/compiler/go_generator.cc") - list(APPEND FlatBuffers_Compiler_SRCS "${FlatBuffersSource_DIR}/grpc/src/compiler/java_generator.cc") - - if(NOT TARGET flatbuffers) - add_library(flatbuffers ${FlatBuffers_Library_SRCS}) - target_include_directories(flatbuffers PUBLIC "${FlatBuffersSource_DIR}/include") - endif(NOT TARGET flatbuffers) - - if(NOT TARGET flatc) - add_executable(flatc ${FlatBuffers_Compiler_SRCS}) - target_include_directories(flatc PRIVATE "${FlatBuffersSource_DIR}/grpc") - target_link_libraries(flatc flatbuffers) - endif(NOT TARGET flatc) - - set(FlatBuffers_FOUND TRUE PARENT_SCOPE) -endfunction(_FlatBuffers_import) - -_FlatBuffers_import() - -if(FlatBuffers_FOUND) - function(FlatBuffers_Generate PREFIX OUTPUT_DIR SCHEMA_DIR) - get_filename_component(abs_output_dir ${OUTPUT_DIR} ABSOLUTE) - get_filename_component(abs_schema_dir ${SCHEMA_DIR} ABSOLUTE) - - foreach(schema ${ARGN}) - get_filename_component(schema_fn "${schema}" NAME) - get_filename_component(dir "${schema}" DIRECTORY) - - get_filename_component(schema_fn_we "${schema_fn}" NAME_WE) - - list(APPEND SCHEMA_FILES "${abs_schema_dir}/${schema}") - list(APPEND OUTPUT_FILES "${abs_output_dir}/${schema_fn_we}_generated.h") - endforeach() - - add_custom_command(OUTPUT ${OUTPUT_FILES} - COMMAND ${CMAKE_COMMAND} -E make_directory "${abs_output_dir}" - COMMAND "$<TARGET_FILE:flatc>" -c --no-includes - --no-union-value-namespacing - --gen-object-api -o "${abs_output_dir}" - ${SCHEMA_FILES} - DEPENDS flatc) - - set(${PREFIX}_SOURCES ${OUTPUT_FILES} PARENT_SCOPE) - set(${PREFIX}_INCLUDE_DIRS ${abs_output_dir} PARENT_SCOPE) - endfunction(FlatBuffers_Generate) -endif(FlatBuffers_FOUND) diff --git a/cmake/packages/FlatBuffersSourceConfig.cmake b/cmake/packages/FlatBuffersSourceConfig.cmake deleted file mode 100644 index 5f142bff7..000000000 --- a/cmake/packages/FlatBuffersSourceConfig.cmake +++ /dev/null @@ -1,19 +0,0 @@ -function(_FlatBuffersSource_import) - if(NOT DOWNLOAD_FLATBUFFERS) - set(FlatBuffersSource_FOUND FALSE PARENT_SCOPE) - return() - endif(NOT DOWNLOAD_FLATBUFFERS) - - nnfw_include(ExternalSourceTools) - nnfw_include(OptionTools) - - # NOTE TensorFlow 1.12 downloads FlatBuffers from the following URL - envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com") - set(FLATBUFFERS_URL ${EXTERNAL_DOWNLOAD_SERVER}/google/flatbuffers/archive/1f5eae5d6a135ff6811724f6c57f911d1f46bb15.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() diff --git a/cmake/packages/GEMMLowpSourceConfig.cmake b/cmake/packages/GEMMLowpSourceConfig.cmake deleted file mode 100644 index 613ff29b5..000000000 --- a/cmake/packages/GEMMLowpSourceConfig.cmake +++ /dev/null @@ -1,19 +0,0 @@ -function(_GEMMLowpSource_import) - if(NOT DOWNLOAD_GEMMLOWP) - set(GEMMLowpSource_FOUND FALSE PARENT_SCOPE) - return() - endif(NOT DOWNLOAD_GEMMLOWP) - - nnfw_include(ExternalSourceTools) - nnfw_include(OptionTools) - - # NOTE TensorFlow 1.12 uses the following URL - envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com") - set(GEMMLOWP_URL ${EXTERNAL_DOWNLOAD_SERVER}/google/gemmlowp/archive/38ebac7b059e84692f53e5938f97a9943c120d98.tar.gz) - ExternalSource_Download("gemmlowp" ${GEMMLOWP_URL}) - - set(GEMMLowpSource_DIR ${gemmlowp_SOURCE_DIR} PARENT_SCOPE) - set(GEMMLowpSource_FOUND TRUE PARENT_SCOPE) -endfunction(_GEMMLowpSource_import) - -_GEMMLowpSource_import() diff --git a/cmake/packages/GTestConfig.cmake b/cmake/packages/GTestConfig.cmake deleted file mode 100644 index 62d2e8967..000000000 --- a/cmake/packages/GTestConfig.cmake +++ /dev/null @@ -1,49 +0,0 @@ -if(OBS_BUILD) - enable_testing() - find_package(GTest REQUIRED) - include_directories(${GTEST_INCLUDE_DIR}) - set(GTest_FOUND TRUE) - return() -endif(OBS_BUILD) - -if(${BUILD_GTEST}) - nnfw_include(ExternalSourceTools) - nnfw_include(ExternalProjectTools) - nnfw_include(OptionTools) - - envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com") - set(GTEST_URL ${EXTERNAL_DOWNLOAD_SERVER}/google/googletest/archive/release-1.8.0.tar.gz) - ExternalSource_Download("gtest" ${GTEST_URL}) - - # gtest_SOURCE_DIR is used in gtest subdirectorty's cmake - set(sourcedir_gtest ${gtest_SOURCE_DIR}) - unset(gtest_SOURCE_DIR) - - if(NOT TARGET gtest_main) - add_extdirectory(${sourcedir_gtest} gtest EXCLUDE_FROM_ALL) - endif(NOT TARGET gtest_main) - - set(GTest_FOUND TRUE) - return() -endif(${BUILD_GTEST}) - -### Find and use pre-installed Google Test -find_package(GTest) -find_package(Threads) - -if(${GTEST_FOUND} AND TARGET Threads::Threads) - if(NOT TARGET gtest) - add_library(gtest INTERFACE) - target_include_directories(gtest INTERFACE ${GTEST_INCLUDE_DIRS}) - target_link_libraries(gtest INTERFACE ${GTEST_LIBRARIES} Threads::Threads) - endif(NOT TARGET gtest) - - if(NOT TARGET gtest_main) - add_library(gtest_main INTERFACE) - target_include_directories(gtest_main INTERFACE ${GTEST_INCLUDE_DIRS}) - target_link_libraries(gtest_main INTERFACE gtest) - target_link_libraries(gtest_main INTERFACE ${GTEST_MAIN_LIBRARIES}) - endif(NOT TARGET gtest_main) - - set(GTest_FOUND TRUE) -endif(${GTEST_FOUND} AND TARGET Threads::Threads) diff --git a/cmake/packages/NEON2SSESourceConfig.cmake b/cmake/packages/NEON2SSESourceConfig.cmake deleted file mode 100644 index b656f5700..000000000 --- a/cmake/packages/NEON2SSESourceConfig.cmake +++ /dev/null @@ -1,19 +0,0 @@ -function(_NEON2SSESource_import) - if(NOT DOWNLOAD_NEON2SSE) - set(NEON2SSESource_FOUND FALSE PARENT_SCOPE) - return() - endif(NOT DOWNLOAD_NEON2SSE) - - nnfw_include(ExternalSourceTools) - nnfw_include(OptionTools) - - # NOTE TensorFlow 1.12 downloads NEON2SSE from the following URL - envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com") - set(NEON2SSE_URL ${EXTERNAL_DOWNLOAD_SERVER}/intel/ARM_NEON_2_x86_SSE/archive/0f77d9d182265259b135dad949230ecbf1a2633d.tar.gz) - ExternalSource_Download("neon_2_sse" ${NEON2SSE_URL}) - - set(NEON2SSESource_DIR ${neon_2_sse_SOURCE_DIR} PARENT_SCOPE) - set(NEON2SSESource_FOUND TRUE PARENT_SCOPE) -endfunction(_NEON2SSESource_import) - -_NEON2SSESource_import() diff --git a/cmake/packages/NoniusConfig.cmake b/cmake/packages/NoniusConfig.cmake deleted file mode 100644 index 35f373a8c..000000000 --- a/cmake/packages/NoniusConfig.cmake +++ /dev/null @@ -1,18 +0,0 @@ -function(_Nonius_import) - nnfw_find_package(NoniusSource QUIET) - - if(NOT NoniusSource_FOUND) - set(Nonius_FOUND FALSE PARENT_SCOPE) - return() - endif(NOT NoniusSource_FOUND) - - if(NOT TARGET nonius) - message(STATUS "Found nonius: TRUE") - add_library(nonius INTERFACE) - target_include_directories(nonius INTERFACE "${NoniusSource_DIR}/include") - endif(NOT TARGET nonius) - - set(Nonius_FOUND TRUE PARENT_SCOPE) -endfunction(_Nonius_import) - -_Nonius_import() diff --git a/cmake/packages/NoniusSourceConfig.cmake b/cmake/packages/NoniusSourceConfig.cmake deleted file mode 100644 index 7349946db..000000000 --- a/cmake/packages/NoniusSourceConfig.cmake +++ /dev/null @@ -1,18 +0,0 @@ -function(_NoniusSource_import) - if(NOT DOWNLOAD_NONIUS) - set(NoniusSource_FOUND FALSE PARENT_SCOPE) - return() - endif(NOT DOWNLOAD_NONIUS) - - nnfw_include(ExternalSourceTools) - nnfw_include(OptionTools) - - envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com") - set(NONIUS_URL ${EXTERNAL_DOWNLOAD_SERVER}/libnonius/nonius/archive/v1.2.0-beta.1.tar.gz) - ExternalSource_Download("nonius" ${NONIUS_URL}) - - set(NoniusSource_DIR ${nonius_SOURCE_DIR} PARENT_SCOPE) - set(NoniusSource_FOUND TRUE PARENT_SCOPE) -endfunction(_NoniusSource_import) - -_NoniusSource_import() diff --git a/cmake/packages/TensorFlowSourceConfig.cmake b/cmake/packages/TensorFlowSourceConfig.cmake deleted file mode 100644 index 5828334c7..000000000 --- a/cmake/packages/TensorFlowSourceConfig.cmake +++ /dev/null @@ -1,18 +0,0 @@ -function(_TensorFlowSource_import) - if(NOT DOWNLOAD_TENSORFLOW) - set(TensorFlowSource_FOUND FALSE PARENT_SCOPE) - return() - endif(NOT DOWNLOAD_TENSORFLOW) - - nnfw_include(ExternalSourceTools) - nnfw_include(OptionTools) - - envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com") - set(TENSORFLOW_URL ${EXTERNAL_DOWNLOAD_SERVER}/tensorflow/tensorflow/archive/v1.12.0.tar.gz) - ExternalSource_Download("tensorflow" ${TENSORFLOW_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/TensorflowConfig.cmake b/cmake/packages/TensorflowConfig.cmake deleted file mode 100644 index ab4e2715e..000000000 --- a/cmake/packages/TensorflowConfig.cmake +++ /dev/null @@ -1,44 +0,0 @@ -function(_Tensorflow_Import) - if(NOT DEFINED TENSORFLOW_DIR) - set(TENSORFLOW_DIR ${CMAKE_SOURCE_DIR}/externals/tensorflow) - endif(NOT DEFINED TENSORFLOW_DIR) - - if(NOT DEFINED NSYNC_ARCH) - set(NSYNC_ARCH "default") - endif(NOT DEFINED NSYNC_ARCH) - - set(TENSROFLOW_MAKEFILE_DIR "${TENSORFLOW_DIR}/tensorflow/contrib/makefile") - set(TENSORFLOW_GEN_DIR "${TENSROFLOW_MAKEFILE_DIR}/gen") - set(TENSORFLOW_DOWNLOADS_DIR "${TENSROFLOW_MAKEFILE_DIR}/downloads") - - if(NOT EXISTS "${TENSORFLOW_GEN_DIR}/lib/libtensorflow-core.a") - set(Tensorflow_FOUND FALSE PARENT_SCOPE) - return() - endif() - - if(NOT EXISTS "${TENSORFLOW_DOWNLOADS_DIR}/nsync/builds/${NSYNC_ARCH}.linux.c++11/libnsync.a") - set(Tensorflow_FOUND FALSE PARENT_SCOPE) - return() - endif() - - if(NOT TARGET tensorflow-core) - add_library(tensorflow-core INTERFACE) - - target_include_directories(tensorflow-core INTERFACE "${TENSORFLOW_DIR}") - target_include_directories(tensorflow-core INTERFACE "${TENSORFLOW_GEN_DIR}/proto") - target_include_directories(tensorflow-core INTERFACE "${TENSORFLOW_GEN_DIR}/protobuf/include") - target_include_directories(tensorflow-core INTERFACE "${TENSORFLOW_DOWNLOADS_DIR}/eigen") - target_include_directories(tensorflow-core INTERFACE "${TENSORFLOW_DOWNLOADS_DIR}/nsync/public") - - target_link_libraries(tensorflow-core INTERFACE -Wl,--whole-archive "${TENSORFLOW_GEN_DIR}/lib/libtensorflow-core.a" -Wl,--no-whole-archive) - target_link_libraries(tensorflow-core INTERFACE "${TENSORFLOW_GEN_DIR}/protobuf/lib/libprotobuf.a") - target_link_libraries(tensorflow-core INTERFACE "${TENSORFLOW_DOWNLOADS_DIR}/nsync/builds/${NSYNC_ARCH}.linux.c++11/libnsync.a") - target_link_libraries(tensorflow-core INTERFACE ${LIB_PTHREAD} dl) - - message(STATUS "Found Tensorflow (lib: ${TENSORFLOW_GEN_DIR}/lib/libtensorflow-core.a") - endif() - - set(Tensorflow_FOUND TRUE PARENT_SCOPE) -endfunction(_Tensorflow_Import) - -_Tensorflow_Import() |