1
0
Fork 0

add build target to compile the starter if its present (#3679)

This commit is contained in:
Wilfried Goesgens 2017-12-06 16:33:37 +01:00 committed by Jan
parent 79ea9d8291
commit 7dd439f203
7 changed files with 63 additions and 10 deletions

View File

@ -106,3 +106,32 @@ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/snappy/google-snappy-d53de18)
################################################################################
set(LINK_DIRECTORIES "${LINK_DIRECTORIES}" PARENT_SCOPE)
set(STARTER_SOURCE "${PROJECT_SOURCE_DIR}/3rdParty/arangodb-starter/")
set(STARTER_BUILD "${CMAKE_CURRENT_BINARY_DIR}/arangodb-starter/")
set(STARTER_BINARY "${STARTER_BUILD}/arangodb${CMAKE_EXECUTABLE_SUFFIX}")
if (EXISTS ${STARTER_SOURCE})
find_program(GO_COMMAND "go")
if (GO_COMMAND)
MESSAGE("-- building arangodb starter.")
ExternalProject_Add(arangodb_starter_build
SOURCE_DIR
${STARTER_SOURCE}
CONFIGURE_COMMAND
""
BINARY_DIR
${STARTER_BUILD}
BUILD_COMMAND
$(MAKE) -f "${STARTER_SOURCE}Makefile" "NODOCKER=1" "BUILDDIR=${STARTER_BUILD}" "SCRIPTDIR=${STARTER_SOURCE}" local
LOG_INSTALL 1
INSTALL_DIR
${CMAKE_INSTALL_BINDIR}
INSTALL_COMMAND
${CMAKE_COMMAND} -E copy ${STARTER_BINARY} ${CMAKE_INSTALL_BINDIR}
)
list(APPEND THIRDPARTY_BIN ${STARTER_BINARY})
set(THIRDPARTY_BIN ${THIRDPARTY_BIN} PARENT_SCOPE)
else()
MESSAGE(WARNING "arangodb starter source present, but no go command to build it found.")
endif()
endif()

View File

@ -4,14 +4,18 @@ set -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd ${DIR}/..
cd "${DIR}/.."
EP=""
for i in $@; do
for i in "$@"; do
if test "$i" == "--enterprise"; then
EP="EP"
fi
done
if ! test -d 3rdParty/arangodb-starter; then
MOREOPTS+=("--downloadStarter")
fi
./Installation/Jenkins/build.sh \
standard \
--rpath \
@ -20,9 +24,9 @@ done
--buildDir build-${EP}bundle \
--prefix "/opt/arangodb" \
--targetDir /var/tmp/ \
--downloadStarter \
--clang \
--staticOpenSSL \
$@
"${MOREOPTS[@]}" \
"$@"
cd ${DIR}/..
cd "${DIR}/.."

View File

@ -18,6 +18,10 @@ done
export CPU_CORES=$(grep -c ^processor /proc/cpuinfo)
if ! test -d 3rdParty/arangodb-starter; then
MOREOPTS="${MOREOPTS} --downloadStarter"
fi
./Installation/Jenkins/build.sh \
maintainer \
--failure-tests \
@ -27,8 +31,8 @@ export CPU_CORES=$(grep -c ^processor /proc/cpuinfo)
--buildDir build-${EP}deb-dbg \
--targetDir /var/tmp/ \
--jemalloc \
--downloadStarter \
--noopt \
${MOREOPTS} \
$@
cd ${DIR}/..

View File

@ -21,6 +21,10 @@ for i in $@; do
fi
done
if ! test -d 3rdParty/arangodb-starter; then
MOREOPTS="${MOREOPTS} --downloadStarter"
fi
export CPU_CORES=$(grep -c ^processor /proc/cpuinfo)
./Installation/Jenkins/build.sh \
@ -31,8 +35,8 @@ export CPU_CORES=$(grep -c ^processor /proc/cpuinfo)
--buildDir build-${EP}deb \
--targetDir /var/tmp/ \
--jemalloc \
--downloadStarter \
--noopt \
${MOREOPTS} \
$@
cd ${DIR}/..

View File

@ -12,13 +12,17 @@ for i in $@; do
fi
done
if ! test -d 3rdParty/arangodb-starter; then
MOREOPTS="${MOREOPTS} --downloadStarter"
fi
./Installation/Jenkins/build.sh \
standard \
--msvc \
--buildDir /cygdrive/c/b/${EP}/ \
--package NSIS \
--targetDir /var/tmp/ \
--downloadStarter \
${MOREOPTS} \
$@
cd ${DIR}/..

View File

@ -13,6 +13,10 @@ for i in $@; do
fi
done
if ! test -d 3rdParty/arangodb-starter; then
MOREOPTS="${MOREOPTS} --downloadStarter"
fi
./Installation/Jenkins/build.sh \
standard \
--rpath \
@ -20,8 +24,8 @@ done
--buildDir build-${EP}rpm \
--targetDir /var/tmp/ \
--jemalloc \
--downloadStarter \
--noopt \
${MOREOPTS} \
$@
cd ${DIR}/..

View File

@ -21,6 +21,10 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd ${DIR}/..
if ! test -d 3rdParty/arangodb-starter; then
MOREOPTS="${MOREOPTS} --downloadStarter"
fi
./Installation/Jenkins/build.sh \
standard \
--rpath \
@ -29,8 +33,8 @@ cd ${DIR}/..
--snap \
--buildDir build-${EP}snap \
--targetDir /var/tmp/ \
--downloadStarter \
--noopt \
${MOREOPTS} \
$@
cd ${DIR}/..