Use Ninja build system when available

When Ninja is installed, use it instead of Make for native builds and for Android cross-builds.
This commit is contained in:
Marat Dukhan
2018-03-06 14:05:42 -08:00
committed by Marat Dukhan
parent 60aa8c793d
commit bbc2c642c9
3 changed files with 17 additions and 2 deletions

View File

@ -48,6 +48,11 @@ cd $BUILD_ROOT
CMAKE_ARGS=()
# If Ninja is installed, prefer it to Make
if [ -x "$(command -v ninja)" ]; then
CMAKE_ARGS+=("-GNinja")
fi
# Use locally built protoc because we'll build libprotobuf for the
# target architecture and need an exact version match.
CMAKE_ARGS+=("-DCAFFE2_CUSTOM_PROTOC_EXECUTABLE=$CAFFE2_ROOT/build_host_protoc/bin/protoc")