diff --git a/WORKSPACE b/WORKSPACE index 2d830ef91ea99b7715a10bd913a2a0c1869a2199..fa4e8f88431aab704e456b9462dfb499b464c004 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -19,6 +19,14 @@ http_archive( ], ) +new_http_archive( + name = "gtest", + url = "http://v9.git.n.xiaomi.com/deep-learning/googletest/repository/archive.zip?ref=release-1.8.0", + strip_prefix = "googletest-release-1.8.0-ec44c6c1675c25b9827aacd08c02433cccde7780", + sha256 = "a0b43a0a43cda0cc401a46d75519d961ef27f6674d4126366e47d9c946c4bbcd", + build_file = "mace/third_party/gtest.BUILD", +) + # Import all of the tensorflow dependencies. load('@org_tensorflow//tensorflow:workspace.bzl', 'tf_workspace') tf_workspace(tf_repo_name = "org_tensorflow") diff --git a/mace/third_party/ncnn.BUILD b/mace/third_party/ncnn.BUILD new file mode 100644 index 0000000000000000000000000000000000000000..f5489f2da8aa7cceb38743f681493ad69b35a832 --- /dev/null +++ b/mace/third_party/ncnn.BUILD @@ -0,0 +1,15 @@ +genrule( + name = "cmake", + outs = [ + "build-android-aarch64/install/lib/libncnn.a", + "build-android-aarch64/install/include/blob.h", + "build-android-aarch64/install/include/cpu.h", + "build-android-aarch64/install/include/layer.h", + "build-android-aarch64/install/include/mat.h", + "build-android-aarch64/install/include/net.h", + "build-android-aarch64/install/include/opencv.h", + "build-android-aarch64/install/include/layer_type_enum.h", + "build-android-aarch64/install/include/platform.h", + ], + cmd = "pwd; echo $$(dirname $(location cpu.h)); mkdir -p build-android-aarch64; pushd build-android-aarch64; cmake -DCMAKE_TOOLCHAIN_FILE=../external/ncnn/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DANDROID_NATIVE_API_LEVEL=android-21 -DANDROID_FORCE_ARM_BUILD=OFF -DANDROID_STL_FORCE_FEATURES=OFF ../external/ncnn && make && make install; popd", +)