mirror of https://github.com/c-ares/c-ares.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.2 KiB
40 lines
1.2 KiB
#!/bin/sh |
|
# Copyright (C) The c-ares project and its contributors |
|
# SPDX-License-Identifier: MIT |
|
set -e -x |
|
|
|
OS="" |
|
if [ "$TRAVIS_OS_NAME" != "" ]; then |
|
OS="$TRAVIS_OS_NAME" |
|
elif [ "$CIRRUS_OS" != "" ]; then |
|
OS="$CIRRUS_OS" |
|
fi |
|
|
|
if [ "$DIST" = "iOS" ] ; then |
|
XCODE_PATH=`xcode-select -print-path` |
|
SYSROOT="${XCODE_PATH}/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/" |
|
fi |
|
|
|
if [ "$BUILD_TYPE" = "autotools" -o "$BUILD_TYPE" = "coverage" ]; then |
|
autoreconf -fi |
|
mkdir atoolsbld |
|
cd atoolsbld |
|
if [ "$DIST" = "iOS" ] ; then |
|
export CFLAGS="${CFLAGS} -isysroot ${SYSROOT}" |
|
export CXXFLAGS="${CXXFLAGS} -isysroot ${SYSROOT}" |
|
export LDFLAGS="${LDFLAGS} -isysroot ${SYSROOT}" |
|
fi |
|
export CFLAGS="${CFLAGS} -O0 -g" |
|
export CXXFLAGS="${CXXFLAGS} -O0 -g" |
|
$SCAN_WRAP ../configure --disable-symbol-hiding --enable-maintainer-mode $CONFIG_OPTS |
|
$SCAN_WRAP make |
|
else |
|
# Use cmake for everything else |
|
mkdir cmakebld |
|
cd cmakebld |
|
if [ "$DIST" = "iOS" ] ; then |
|
CMAKE_FLAGS="${CMAKE_FLAGS} -DCMAKE_OSX_SYSROOT=${SYSROOT}" |
|
fi |
|
$SCAN_WRAP cmake ${CMAKE_FLAGS} ${CMAKE_TEST_FLAGS} .. |
|
$SCAN_WRAP cmake --build . |
|
fi
|
|
|