Renamed CARLA_CLANG_VERSION_MAJOR to CARLA_LLVM_VERSION_MAJOR.
This commit is contained in:
parent
9a005e9c7c
commit
9b13826865
|
@ -78,6 +78,8 @@ fi
|
|||
# ==============================================================================
|
||||
ADRSS_INSTALL_DIR="${CARLA_BUILD_FOLDER}/${ADRSS_BASENAME}/install"
|
||||
|
||||
CARLA_LLVM_VERSION_MAJOR=$(cut -d'.' -f1 <<<"$(clang -dumpversion)")
|
||||
|
||||
#
|
||||
# Since it it not possible with boost-python to build more than one python version at once (find_package has some bugs)
|
||||
# we have to build it for every version in a separate colcon build
|
||||
|
@ -92,9 +94,9 @@ for PY_VERSION in ${PY_VERSION_LIST[@]} ; do
|
|||
|
||||
pushd "${ADRSS_COLCON_WORKSPACE}" >/dev/null
|
||||
if [ "${CMAKE_PREFIX_PATH}" == "" ]; then
|
||||
CMAKE_PREFIX_PATH="${CARLA_BUILD_FOLDER}/boost-1.72.0-c8-install;${CARLA_BUILD_FOLDER}/proj-install"
|
||||
CMAKE_PREFIX_PATH="${CARLA_BUILD_FOLDER}/boost-1.72.0-c$CARLA_LLVM_VERSION_MAJOR-install;${CARLA_BUILD_FOLDER}/proj-install"
|
||||
else
|
||||
CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH};${CARLA_BUILD_FOLDER}/boost-1.72.0-c8-install;${CARLA_BUILD_FOLDER}/proj-install"
|
||||
CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH};${CARLA_BUILD_FOLDER}/boost-1.72.0-c$CARLA_LLVM_VERSION_MAJOR-install;${CARLA_BUILD_FOLDER}/proj-install"
|
||||
fi
|
||||
|
||||
# get the python version of the binding to be built
|
||||
|
|
|
@ -89,12 +89,14 @@ if ${BUILD_OSM2ODR} ; then
|
|||
mkdir -p ${OSM2ODR_BUILD_FOLDER}
|
||||
cd ${OSM2ODR_BUILD_FOLDER}
|
||||
|
||||
if [[ -z "${CARLA_CLANG_VERSION_MAJOR}" ]]; then
|
||||
CARLA_LLVM_VERSION_MAJOR=$(cut -d'.' -f1 <<<"$(clang -dumpversion)")
|
||||
|
||||
if [[ -z "${CARLA_LLVM_VERSION_MAJOR}" ]]; then
|
||||
fatal_error "Missing clang version variable."
|
||||
fi
|
||||
|
||||
export CC=/usr/bin/clang-$CARLA_CLANG_VERSION_MAJOR
|
||||
export CXX=/usr/bin/clang++-$CARLA_CLANG_VERSION_MAJOR
|
||||
export CC=/usr/bin/clang-$CARLA_LLVM_VERSION_MAJOR
|
||||
export CXX=/usr/bin/clang++-$CARLA_LLVM_VERSION_MAJOR
|
||||
|
||||
cmake ${OSM2ODR_SOURCE_FOLDER} \
|
||||
-G "Eclipse CDT4 - Ninja" \
|
||||
|
|
|
@ -48,14 +48,16 @@ while [[ $# -gt 0 ]]; do
|
|||
esac
|
||||
done
|
||||
|
||||
CARLA_LLVM_VERSION_MAJOR=$(cut -d'.' -f1 <<<"$(clang -dumpversion)")
|
||||
|
||||
source $(dirname "$0")/Environment.sh
|
||||
|
||||
if [[ -z "${CARLA_CLANG_VERSION_MAJOR}" ]]; then
|
||||
if [[ -z "${CARLA_LLVM_VERSION_MAJOR}" ]]; then
|
||||
fatal_error "Missing clang version variable."
|
||||
fi
|
||||
|
||||
export CC=clang-$CARLA_CLANG_VERSION_MAJOR
|
||||
export CXX=clang++-$CARLA_CLANG_VERSION_MAJOR
|
||||
export CC=clang-$CARLA_LLVM_VERSION_MAJOR
|
||||
export CXX=clang++-$CARLA_LLVM_VERSION_MAJOR
|
||||
|
||||
if ! { ${REMOVE_INTERMEDIATE} || ${BUILD_PYTHONAPI} ; }; then
|
||||
fatal_error "Nothing selected to be done."
|
||||
|
|
|
@ -37,16 +37,18 @@ done
|
|||
# -- Set up environment --------------------------------------------------------
|
||||
# ==============================================================================
|
||||
|
||||
CARLA_LLVM_VERSION_MAJOR=$(cut -d'.' -f1 <<<"$(clang -dumpversion)")
|
||||
|
||||
source $(dirname "$0")/Environment.sh
|
||||
|
||||
command -v /usr/bin/clang++-$CARLA_CLANG_VERSION_MAJOR >/dev/null 2>&1 || {
|
||||
echo >&2 "clang-$CARLA_CLANG_VERSION_MAJOR is required, but it's not installed.";
|
||||
command -v /usr/bin/clang++-$CARLA_LLVM_VERSION_MAJOR >/dev/null 2>&1 || {
|
||||
echo >&2 "clang-$CARLA_LLVM_VERSION_MAJOR is required, but it's not installed.";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
CXX_TAG=c$CARLA_CLANG_VERSION_MAJOR
|
||||
export CC=/usr/bin/clang-$CARLA_CLANG_VERSION_MAJOR
|
||||
export CXX=/usr/bin/clang++-$CARLA_CLANG_VERSION_MAJOR
|
||||
CXX_TAG=c$CARLA_LLVM_VERSION_MAJOR
|
||||
export CC=/usr/bin/clang-$CARLA_LLVM_VERSION_MAJOR
|
||||
export CXX=/usr/bin/clang++-$CARLA_LLVM_VERSION_MAJOR
|
||||
|
||||
# Convert comma-separated string to array of unique elements.
|
||||
IFS="," read -r -a PY_VERSION_LIST <<< "${PY_VERSION_LIST}"
|
||||
|
@ -58,7 +60,7 @@ pushd ${CARLA_BUILD_FOLDER} >/dev/null
|
|||
# -- Get and compile libc++ ----------------------------------------------------
|
||||
# ==============================================================================
|
||||
|
||||
LLVM_BASENAME=llvm-$CARLA_CLANG_VERSION_MAJOR.0
|
||||
LLVM_BASENAME=llvm-$CARLA_LLVM_VERSION_MAJOR.0
|
||||
|
||||
LLVM_INCLUDE=${PWD}/${LLVM_BASENAME}-install/include/c++/v1
|
||||
LLVM_LIBPATH=${PWD}/${LLVM_BASENAME}-install/lib
|
||||
|
@ -70,9 +72,9 @@ else
|
|||
|
||||
log "Retrieving libc++."
|
||||
|
||||
git clone --depth=1 -b release_80 https://github.com/llvm-mirror/llvm.git ${LLVM_BASENAME}-source
|
||||
git clone --depth=1 -b release_80 https://github.com/llvm-mirror/libcxx.git ${LLVM_BASENAME}-source/projects/libcxx
|
||||
git clone --depth=1 -b release_80 https://github.com/llvm-mirror/libcxxabi.git ${LLVM_BASENAME}-source/projects/libcxxabi
|
||||
git clone --depth=1 -b release_${CARLA_LLVM_VERSION_MAJOR}0 https://github.com/llvm-mirror/llvm.git ${LLVM_BASENAME}-source
|
||||
git clone --depth=1 -b release_${CARLA_LLVM_VERSION_MAJOR}0 https://github.com/llvm-mirror/libcxx.git ${LLVM_BASENAME}-source/projects/libcxx
|
||||
git clone --depth=1 -b release_${CARLA_LLVM_VERSION_MAJOR}0 https://github.com/llvm-mirror/libcxxabi.git ${LLVM_BASENAME}-source/projects/libcxxabi
|
||||
|
||||
log "Compiling libc++."
|
||||
|
||||
|
@ -148,7 +150,7 @@ for PY_VERSION in ${PY_VERSION_LIST[@]} ; do
|
|||
|
||||
pushd ${BOOST_BASENAME}-source >/dev/null
|
||||
|
||||
BOOST_TOOLSET="clang-$CARLA_CLANG_VERSION_MAJOR.0"
|
||||
BOOST_TOOLSET="clang-$CARLA_LLVM_VERSION_MAJOR.0"
|
||||
BOOST_CFLAGS="-fPIC -std=c++14 -DBOOST_ERROR_CODE_HEADER_ONLY"
|
||||
|
||||
py3="/usr/bin/env python${PY_VERSION}"
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
# Here CURDIR is assumed to be the root folder of the project.
|
||||
|
||||
export CARLA_CLANG_VERSION_MAJOR=$(cut -d'.' -f1 <<<"$(clang -dumpversion)")
|
||||
|
||||
CARLA_ROOT_FOLDER=${CURDIR}
|
||||
CARLA_BUILD_FOLDER=${CURDIR}/Build
|
||||
CARLA_DIST_FOLDER=${CURDIR}/Dist
|
||||
|
|
Loading…
Reference in New Issue