File: build-ispc.sh

package info (click to toggle)
ispc 1.28.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 97,620 kB
  • sloc: cpp: 77,067; python: 8,303; yacc: 3,337; lex: 1,126; ansic: 631; sh: 475; makefile: 17
file content (31 lines) | stat: -rwxr-xr-x 920 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash -e
#
# Copyright 2024, Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause

echo PATH=$PATH

if [[ $OSTYPE == 'darwin'* ]]; then
  # macOS is treated differently because we don't build benchmarks and package name is different.
  # Benchmarks are not built, because Github Action macOS shared runners run on too old hardware -
  # IvyBridge, i.e. AVX1, while our benchmark setup assumes at least AVX2.
  cmake -B build \
    -DISPC_MACOS_UNIVERSAL_BINARIES=ON \
    -DISPC_PREPARE_PACKAGE=ON \
    -DCMAKE_CXX_FLAGS="-Werror" \
    -DISPC_PACKAGE_NAME=ispc-trunk-macos \
    $@
else
  ARCH=$(uname -m)
  BENCHMARKS=ON
  if [ "$ARCH" == "aarch64" ]; then
    BENCHMARKS=OFF
  fi
  cmake -B build \
    -DISPC_INCLUDE_BENCHMARKS=${BENCHMARKS} \
    -DISPC_PREPARE_PACKAGE=ON \
    -DCMAKE_CXX_FLAGS="-Werror" \
    -DISPC_PACKAGE_NAME=ispc-trunk-linux \
    $@
fi
cmake --build build --target package -j4