diff --git a/Build/AtlasBuildScripts/build_Gaudi.sh b/Build/AtlasBuildScripts/build_Gaudi.sh index 36a2a613b57d996dd239aa1ac93775a9a1a8daab..20b648d15fe4599274294672eab73bc6f2eaf0b4 100755 --- a/Build/AtlasBuildScripts/build_Gaudi.sh +++ b/Build/AtlasBuildScripts/build_Gaudi.sh @@ -26,7 +26,7 @@ EXTPROJECT="" PLATFORM="" RPMDIR="" BUILDTYPE="Release" -EXTRACMAKE="" +EXTRACMAKE=() while getopts ":s:b:i:e:p:f:r:t:x:h" opt; do case $opt in s) @@ -54,7 +54,7 @@ while getopts ":s:b:i:e:p:f:r:t:x:h" opt; do BUILDTYPE=$OPTARG ;; x) - EXTRACMAKE=$OPTARG + EXTRACMAKE+=($OPTARG) ;; h) usage @@ -98,7 +98,7 @@ rm -f CMakeCache.txt rm -rf * # Remove the full build temporarily, to fix GAUDI-1315 cmake -DCMAKE_BUILD_TYPE:STRING=${BUILDTYPE} -DCTEST_USE_LAUNCHERS:BOOL=TRUE \ -DGAUDI_ATLAS:BOOL=TRUE -DGAUDI_ATLAS_BASE_PROJECT:STRING=${EXTPROJECT} \ - -DCMAKE_INSTALL_PREFIX:PATH=/InstallArea/${PLATFORM} ${EXTRACMAKE} \ + -DCMAKE_INSTALL_PREFIX:PATH=/InstallArea/${PLATFORM} ${EXTRACMAKE[@]} \ ${SOURCEDIR} || touch $error_stamp } 2>&1 | tee cmake_config.log test -f $error_stamp && ((ERROR_COUNT++)) diff --git a/Build/AtlasBuildScripts/build_atlasexternals.sh b/Build/AtlasBuildScripts/build_atlasexternals.sh index fe370f11a699aafa74e03c2f0978babcd76b8d99..c1a3bb664584900214010287103eb8e70763c7f2 100755 --- a/Build/AtlasBuildScripts/build_atlasexternals.sh +++ b/Build/AtlasBuildScripts/build_atlasexternals.sh @@ -14,7 +14,7 @@ set -o pipefail # Function printing the usage information for the script usage() { echo "Usage: build_atlasexternals.sh <-s source dir> <-b build dir> " \ - "<-i install dir> [-p project] [-r RPM dir] [-t build type] [-d (debug output)]" \ + "<-i install dir> [-p project] [-r RPM dir] [-t build type] " \ "[-x extra CMake arguments]" } @@ -26,9 +26,8 @@ PROJECT="AthenaExternals" RPMDIR="" BUILDTYPE="Release" PROJECTVERSION="" -DEBUGCMAKE="" -EXTRACMAKE="" -while getopts ":s:b:i:p:r:t:v:h:x:d" opt; do +EXTRACMAKE=() +while getopts ":s:b:i:p:r:t:v:hx:d" opt; do case $opt in s) SOURCEDIR=$OPTARG @@ -49,15 +48,15 @@ while getopts ":s:b:i:p:r:t:v:h:x:d" opt; do BUILDTYPE=$OPTARG ;; x) - EXTRACMAKE=$OPTARG - ;; - d) - DEBUGCMAKE="--trace" - echo "Using the '--trace' option to debug the CMake configuration --> Verbose output!" + EXTRACMAKE+=($OPTARG) ;; v) PROJECTVERSION=$OPTARG ;; + h) + usage + exit 0 + ;; :) echo "Argument -$OPTARG requires a parameter!" usage @@ -96,9 +95,8 @@ fi error_stamp=`mktemp .tmp.error.XXXXX` ; rm -f $error_stamp { rm -f CMakeCache.txt - cmake ${DEBUGCMAKE} -DCMAKE_BUILD_TYPE:STRING=${BUILDTYPE} -DCTEST_USE_LAUNCHERS:BOOL=TRUE \ - ${EXTRACONF} \ - ${EXTRACMAKE} \ + cmake -DCMAKE_BUILD_TYPE:STRING=${BUILDTYPE} -DCTEST_USE_LAUNCHERS:BOOL=TRUE \ + ${EXTRACONF} ${EXTRACMAKE[@]} \ ${SOURCEDIR}/Projects/${PROJECT}/ || touch $error_stamp } 2>&1 | tee cmake_config.log test -f $error_stamp && ((ERROR_COUNT++)) diff --git a/Projects/AthSimulation/build_externals.sh b/Projects/AthSimulation/build_externals.sh index cbcdd322d9ec8df6061173be9760ee2e8d65e308..6d14a4c12e05e278b67eea7c8919b0a9961084b2 100755 --- a/Projects/AthSimulation/build_externals.sh +++ b/Projects/AthSimulation/build_externals.sh @@ -11,6 +11,8 @@ usage() { echo " build" echo " -c: Build the externals for the continuous integration (CI) system," echo " skipping the build of the externals RPMs." + echo " -x: Extra cmake argument(s) to provide for the build(configuration)" + echo " of all externals needed by AthSimulation." echo "If a build_dir is not given the default is '../build'" echo "relative to the athena checkout" } @@ -20,7 +22,8 @@ BUILDDIR="" BUILDTYPE="RelWithDebInfo" FORCE="" CI="" -while getopts ":t:b:fch" opt; do +EXTRACMAKE=() +while getopts ":t:b:x:fch" opt; do case $opt in t) BUILDTYPE=$OPTARG @@ -34,6 +37,9 @@ while getopts ":t:b:fch" opt; do c) CI="1" ;; + x) + EXTRACMAKE+=($OPTARG) + ;; h) usage exit 0 @@ -51,25 +57,6 @@ while getopts ":t:b:fch" opt; do esac done -# Version comparison function. Taken from a StackOverflow article. -verlte() { - if [ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]; then - return 1 - fi - return 0 -} - -# First off, check that we are using a new enough version of Git. We need -# at least version 1.8.1. -git_min_version=1.8.1 -git_version=`git --version | awk '{print $3}'` -verlte "${git_min_version}" "${git_version}" -if [ $? = 0 ]; then - echo "Detected git version (${git_version}) not new enough." - echo "Need at least: ${git_min_version}" - exit 1 -fi - # Stop on errors from here on out: set -e set -o pipefail @@ -131,7 +118,7 @@ ${scriptsdir}/build_atlasexternals.sh \ -b ${BUILDDIR}/build/AthSimulationExternals \ -i ${BUILDDIR}/install/AthSimulationExternals/${NICOS_PROJECT_VERSION} \ -p AthSimulationExternals ${RPMOPTIONS} -t ${BUILDTYPE} \ - -v ${NICOS_PROJECT_VERSION} + ${EXTRACMAKE[@]/#/-x } -v ${NICOS_PROJECT_VERSION} # Get the "platform name" from the directory created by the AthSimulationExternals # build: @@ -152,4 +139,5 @@ ${scriptsdir}/build_Gaudi.sh \ -b ${BUILDDIR}/build/GAUDI \ -i ${BUILDDIR}/install/GAUDI/${NICOS_PROJECT_VERSION} \ -e ${BUILDDIR}/install/AthSimulationExternals/${NICOS_PROJECT_VERSION}/InstallArea/${platform} \ - -p AthSimulationExternals -f ${platform} ${RPMOPTIONS} -t ${BUILDTYPE} + -p AthSimulationExternals -f ${platform} ${EXTRACMAKE[@]/#/-x } \ + ${RPMOPTIONS} -t ${BUILDTYPE} diff --git a/Projects/Athena/build_externals.sh b/Projects/Athena/build_externals.sh index 9683078b6b6d6deafdae6c3a0ac5232daaf91358..260703c7112970626cea39ec3bb743025bf8076b 100755 --- a/Projects/Athena/build_externals.sh +++ b/Projects/Athena/build_externals.sh @@ -11,8 +11,8 @@ usage() { echo " build" echo " -c: Build the externals for the continuous integration (CI) system," echo " skipping the build of the externals RPMs." - echo " -d: For debugging the CMake configuration: run 'cmake' with the '--trace' option (very verbose output!)" - echo " -x: To pass arbitrary extra arguments to the CMake configuration" + echo " -x: Extra cmake argument(s) to provide for the build(configuration)" + echo " of all externals needed by Athena." echo "If a build_dir is not given the default is '../build'" echo "relative to the athena checkout" } @@ -22,9 +22,8 @@ BUILDDIR="" BUILDTYPE="RelWithDebInfo" FORCE="" CI="" -DEBUG_CMAKE_CONFIG="" -EXTRACMAKE="" -while getopts ":t:b:fchdx:" opt; do +EXTRACMAKE=() +while getopts ":t:b:x:fch" opt; do case $opt in t) BUILDTYPE=$OPTARG @@ -38,11 +37,8 @@ while getopts ":t:b:fchdx:" opt; do c) CI="1" ;; - d) - DEBUG_CMAKE_CONFIG="-d" - ;; x) - EXTRACMAKE="-x $OPTARG" + EXTRACMAKE+=($OPTARG) ;; h) usage @@ -61,30 +57,10 @@ while getopts ":t:b:fchdx:" opt; do esac done -# Version comparison function. Taken from a StackOverflow article. -verlte() { - if [ "$1" = "`echo -e $1'\n'$2 | sort -V | head -n1`" ]; then - return 1 - fi - return 0 -} - -# First off, check that we are using a new enough version of Git. We need -# at least version 1.8.1. -git_min_version=1.8.1 -git_version=`git --version | awk '{print $3}'` -verlte "${git_min_version}" "${git_version}" -if [ $? = 0 ]; then - echo "Detected git version (${git_version}) not new enough." - echo "Need at least: ${git_min_version}" - exit 1 -fi - # Stop on errors from here on out set -e set -o pipefail - # We are in BASH, get the path of this script in a simple way: thisdir=$(dirname ${BASH_SOURCE[0]}) thisdir=$(cd ${thisdir};pwd) @@ -167,8 +143,7 @@ ${scriptsdir}/build_atlasexternals.sh \ -i ${BUILDDIR}/install/AthenaExternals/${NICOS_PROJECT_VERSION} \ -p AthenaExternals ${RPMOPTIONS} -t ${BUILDTYPE} \ -v ${NICOS_PROJECT_VERSION} \ - ${DEBUG_CMAKE_CONFIG} \ - ${EXTRACMAKE} + ${EXTRACMAKE[@]/#/-x } { test "X${NIGHTLY_STATUS}" != "X" && { @@ -206,7 +181,8 @@ ${scriptsdir}/build_Gaudi.sh \ -b ${BUILDDIR}/build/GAUDI \ -i ${BUILDDIR}/install/GAUDI/${NICOS_PROJECT_VERSION} \ -e ${BUILDDIR}/install/AthenaExternals/${NICOS_PROJECT_VERSION}/InstallArea/${platform} \ - -p AthenaExternals -f ${platform} ${RPMOPTIONS} -t ${BUILDTYPE} ${EXTRACMAKE} + -p AthenaExternals -f ${platform} ${RPMOPTIONS} -t ${BUILDTYPE} \ + ${EXTRACMAKE[@]/#/-x } { test "X${NIGHTLY_STATUS}" != "X" && { @@ -216,4 +192,3 @@ ${scriptsdir}/build_Gaudi.sh \ ) } || true } -