Skip to content
Snippets Groups Projects
Commit 8cfd9bc3 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk
Browse files

macos: use clang with c++17 standard

Change-Id: I0bcf97bc3cc338a1e6e182089638e0d62f2994af
parent bdec942d
No related branches found
No related tags found
No related merge requests found
...@@ -99,6 +99,12 @@ for ARCH in "${ARCHS[@]}"; do ...@@ -99,6 +99,12 @@ for ARCH in "${ARCHS[@]}"; do
echo "$ARCH" echo "$ARCH"
cd "$DAEMON" cd "$DAEMON"
HOST="${ARCH}-apple-darwin" HOST="${ARCH}-apple-darwin"
SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
CC="xcrun -sdk macosx clang"
CXX="xcrun -sdk macosx clang++"
CFLAGS="-arch $ARCH -isysroot $SDKROOT"
CXXFLAGS="-std=c++17 $CFLAGS"
CONFIGURE_FLAGS=" --without-dbus --host=${HOST} -with-contrib=$DAEMON/contrib/${ARCH}-apple-darwin${OS_VER} --prefix=${INSTALL}/daemon/$ARCH" CONFIGURE_FLAGS=" --without-dbus --host=${HOST} -with-contrib=$DAEMON/contrib/${ARCH}-apple-darwin${OS_VER} --prefix=${INSTALL}/daemon/$ARCH"
if [ "${debug}" = "true" ]; then if [ "${debug}" = "true" ]; then
...@@ -113,7 +119,11 @@ for ARCH in "${ARCHS[@]}"; do ...@@ -113,7 +119,11 @@ for ARCH in "${ARCHS[@]}"; do
mkdir -p "build-macos-${ARCH}" mkdir -p "build-macos-${ARCH}"
cd "build-macos-${ARCH}" cd "build-macos-${ARCH}"
"$DAEMON"/configure $CONFIGURE_FLAGS ARCH="$ARCH" || exit 1 "$DAEMON"/configure $CONFIGURE_FLAGS ARCH="$ARCH" \
CC="$CC $CFLAGS" \
CXX="$CXX $CXXFLAGS" \
CFLAGS="$CFLAGS" \
CXXFLAGS="$CXXFLAGS" || exit 1
echo "$CONFIGURE_FLAGS" echo "$CONFIGURE_FLAGS"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment