sgraves/cpp-build-system_mac/pipeline/head There was a failure building this commit
18 lines
510 B
Bash
Executable File
18 lines
510 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
if ([ "$(uname -m)" == "arm64" ] || [ "$(uname -m)" == "aarch64" ]) && [ "${PROJECT_IS_ARM64}" == "0" ]; then
|
|
HOST_CFG="--host=x86_64-apple-darwin"
|
|
CLANG_BIN="$(xcrun -f clang)"
|
|
CLANGXX_BIN="$(xcrun -f clang++)"
|
|
export CC="${CLANG_BIN} -arch x86_64"
|
|
export CXX="${CLANGXX_BIN} -arch x86_64"
|
|
fi
|
|
|
|
CXXFLAGS="-std=gnu++17 -march=$1 -mtune=generic" ./configure \
|
|
--disable-samples \
|
|
--disable-tests \
|
|
--enable-shared=$3 \
|
|
--enable-static=yes \
|
|
--prefix="$2" \
|
|
${HOST_CFG}
|