microsoft/onnxruntime-extensions

Public

mirrored from https://github.com/microsoft/onnxruntime-extensionsAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v0.5.0

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

build.sh

16lines · modecode

1#!/bin/bash
2
3# The example build script to build the source in Linux-like platform
4set -e -x -u
5
6OSNAME=$(uname -s)
7if [[ "$OSNAME" == "Darwin" ]]; then
8 alias nproc="sysctl -n hw.logicalcpu"
9fi
10
11BUILD_FLAVOR=RelWithDebInfo
12target_dir=out/$OSNAME/$BUILD_FLAVOR
13mkdir -p "$target_dir" && cd "$target_dir"
14if [ -z ${CPU_NUMBER+x} ]; then CPU_NUMBER=$(nproc); fi
15# it looks the parallel build on CI pipeline machine causes crashes.
16cmake "$@" ../../.. && cmake --build . --config $BUILD_FLAVOR --parallel "${CPU_NUMBER}"
17