mirror of
https://github.com/pytorch/pytorch.git
synced 2025-11-11 22:34:53 +08:00
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:
committed by
Marat Dukhan
parent
60aa8c793d
commit
bbc2c642c9
@ -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")
|
||||
|
||||
Reference in New Issue
Block a user