diff --git a/Build/AtlasBuildScripts/build_Gaudi.sh b/Build/AtlasBuildScripts/build_Gaudi.sh index c2ad59fe18f8217f38d45fdf95bcbf0a0aab8758..4a7ed2b83fd4230e88aa39f8314db760bcf1f804 100755 --- a/Build/AtlasBuildScripts/build_Gaudi.sh +++ b/Build/AtlasBuildScripts/build_Gaudi.sh @@ -1,5 +1,7 @@ #!/bin/bash # +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# # Script used for building Gaudi. # @@ -14,7 +16,8 @@ set -o pipefail usage() { echo "Usage: build_Gaudi.sh <-s source dir> <-b build dir> " \ "<-i install dir> <-e externals dir> <-p externals project name> " \ - "<-f platform name> [-r RPM dir] [-t build type] [-x extra CMake arguments]" + "<-f platform name> [-r RPM dir] [-t build type] [-v version] " \ + "[-x extra CMake arguments]" } # Parse the command line arguments: @@ -26,8 +29,9 @@ EXTPROJECT="" PLATFORM="" RPMDIR="" BUILDTYPE="Release" +PROJECTVERSION="" EXTRACMAKE=() -while getopts ":s:b:i:e:p:f:r:t:x:h" opt; do +while getopts ":s:b:i:e:p:f:r:t:x:v:h" opt; do case $opt in s) SOURCEDIR=$OPTARG @@ -56,6 +60,9 @@ while getopts ":s:b:i:e:p:f:r:t:x:h" opt; do x) EXTRACMAKE+=($OPTARG) ;; + v) + PROJECTVERSION=$OPTARG + ;; h) usage exit 0 @@ -76,7 +83,7 @@ done # Make sure that the required options were all specified: if [ "$SOURCEDIR" = "" ] || [ "$BUILDDIR" = "" ] || [ "$INSTALLDIR" = "" ] \ || [ "$EXTDIR" = "" ] || [ "$EXTPROJECT" = "" ] \ - || [ "$PLATFORM" = "" ]; then + || [ "$PLATFORM" = "" ] || [ "$PROJECTVERSION" = "" ]; then echo "Not all required parameters received!" usage exit 1 @@ -89,8 +96,6 @@ cd ${BUILDDIR} || ((ERROR_COUNT++)) # Set up the externals project: source ${EXTDIR}/setup.sh || ((ERROR_COUNT++)) -#FIXME: simplify error counting below while keeping '| tee ...' - # Configure the build: error_stamp=`mktemp .tmp.error.XXXXX` ; rm -f $error_stamp { @@ -98,8 +103,8 @@ 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[@]} \ - ${SOURCEDIR} || touch $error_stamp + -DCMAKE_INSTALL_PREFIX:PATH=/GAUDI/${PROJECTVERSION}/InstallArea/${PLATFORM} \ + ${EXTRACMAKE[@]} ${SOURCEDIR} || touch $error_stamp } 2>&1 | tee cmake_config.log test -f $error_stamp && ((ERROR_COUNT++)) rm -f $error_stamp diff --git a/Build/AtlasBuildScripts/build_atlasexternals.sh b/Build/AtlasBuildScripts/build_atlasexternals.sh index aa2c172c9df65523db8ce19aad346a2a24a76bed..2ed8e7825395df0ba7e823f7980934d0314f95a2 100755 --- a/Build/AtlasBuildScripts/build_atlasexternals.sh +++ b/Build/AtlasBuildScripts/build_atlasexternals.sh @@ -1,5 +1,7 @@ #!/bin/bash # +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# # Example script used for building one of the projects from the atlasexternals # repository. # @@ -84,13 +86,9 @@ cd ${BUILDDIR} || ((ERROR_COUNT++)) # Extra settings for providing a project version for the build if necessary: EXTRACONF= if [ "$PROJECTVERSION" != "" ]; then - PNAME=$(echo ${PROJECT} | awk '{print toupper($0)}') - EXTRACONF=-D${PNAME}_PROJECT_VERSION:STRING=${PROJECTVERSION} + EXTRACONF=-DCMAKE_PROJECT_VERSION=${PROJECTVERSION} fi -#FIXME: simplify error counting: - - # Configure the build: error_stamp=`mktemp .tmp.error.XXXXX` ; rm -f $error_stamp { diff --git a/Projects/AnalysisBase/CMakeLists.txt b/Projects/AnalysisBase/CMakeLists.txt index d93a5f72f53e0ba92d9020c026dd6483f9077fa3..45cdf6bb6b87fff2d21155bb70a8f55d2f025dfb 100644 --- a/Projects/AnalysisBase/CMakeLists.txt +++ b/Projects/AnalysisBase/CMakeLists.txt @@ -1,17 +1,14 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # # This is the main CMakeLists.txt file for building the AnalysisBase # software release. # -# The minimum required CMake version: -cmake_minimum_required( VERSION 3.6 FATAL_ERROR ) - -# Read in the project's version from a file called version.txt. But let it be -# overridden from the command line if necessary. +# Set up the project. +cmake_minimum_required( VERSION 3.6 ) file( READ ${CMAKE_SOURCE_DIR}/version.txt _version ) string( STRIP ${_version} _version ) -set( ANALYSISBASE_PROJECT_VERSION ${_version} - CACHE STRING "Version of the AnalysisBase project to build" ) +project( AnalysisBase VERSION ${_version} LANGUAGES C CXX ) unset( _version ) # This project is built on top of AnalysisBaseExternals: @@ -28,9 +25,8 @@ list( INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake ) # Set up CTest: atlas_ctest_setup() -# Declare project name and version -atlas_project( AnalysisBase ${ANALYSISBASE_PROJECT_VERSION} - USE AnalysisBaseExternals ${AnalysisBaseExternals_VERSION} +# Set up the "ATLAS project". +atlas_project( USE AnalysisBaseExternals ${AnalysisBaseExternals_VERSION} PROJECT_ROOT ${CMAKE_SOURCE_DIR}/../../ ) # Configure and install the post-configuration file: @@ -45,10 +41,6 @@ if( NOT "$ENV{NICOS_PROJECT_HOME}" STREQUAL "" ) get_filename_component( _buildDir $ENV{NICOS_PROJECT_HOME} PATH ) list( APPEND _replacements ${_buildDir} "\${AnalysisBase_DIR}/../../../.." ) endif() -if( NOT "$ENV{NICOS_PROJECT_RELNAME}" STREQUAL "" ) - list( APPEND _replacements $ENV{NICOS_PROJECT_RELNAME} - "\${AnalysisBase_VERSION}" ) -endif() # Generate the environment configuration file(s): lcg_generate_env( diff --git a/Projects/AnalysisBase/build.sh b/Projects/AnalysisBase/build.sh index 97717bd1f5b5f94eb108b25de8e7bf6ff6f1d871..bb6fd98656f9062ceb6826f70b3189ab37033820 100755 --- a/Projects/AnalysisBase/build.sh +++ b/Projects/AnalysisBase/build.sh @@ -1,5 +1,7 @@ #!/bin/bash # +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# # Script for building the release on top of externals built using the # script in this directory. # @@ -156,7 +158,7 @@ fi # Install the results: if [ -n "$EXE_INSTALL" ]; then _time_ make install/fast \ - DESTDIR=${BUILDDIR}/install/AnalysisBase/${NICOS_PROJECT_VERSION} \ + DESTDIR=${BUILDDIR}/install \ 2>&1 | tee cmake_install.log fi diff --git a/Projects/AnalysisBase/build_env.sh b/Projects/AnalysisBase/build_env.sh index 846dc892aa5eee75c9f222fd7e918ee2912ace04..99d88f7cd215219b0c04cbd777b4fc4b9193fc73 100644 --- a/Projects/AnalysisBase/build_env.sh +++ b/Projects/AnalysisBase/build_env.sh @@ -1,3 +1,5 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# # This script sets up the build enironment for an AnalysisBase # build, on top of a built set of externals. # @@ -37,14 +39,14 @@ env_setup() { BUILDDIR=${AnalysisBaseSrcDir}/../../../build fi + # Get the version of AnalysisBase for the build. + version=`cat ${AnalysisBaseSrcDir}/version.txt` + # Set up the environment for the build: - export NICOS_PROJECT_VERSION=`cat ${AnalysisBaseSrcDir}/version.txt` - export NICOS_ATLAS_RELEASE=${NICOS_PROJECT_VERSION} - export NICOS_PROJECT_RELNAME=${NICOS_PROJECT_VERSION} - export NICOS_PROJECT_HOME=$(cd ${BUILDDIR}/install;pwd)/AnalysisBase + export NICOS_PROJECT_HOME=$(cd ${BUILDDIR}/install;pwd)/Athena # Set up the AnalysisBaseExternals project: - extDir=${BUILDDIR}/install/AnalysisBaseExternals/${NICOS_PROJECT_VERSION}/InstallArea + extDir=${BUILDDIR}/install/AnalysisBaseExternals/${version}/InstallArea if [ ! -d ${extDir} ]; then echo "Didn't find the AnalysisBaseExternals project under ${extDir}" fi diff --git a/Projects/AnalysisBase/build_externals.sh b/Projects/AnalysisBase/build_externals.sh index 26089095a33d7babfe64c5844dbd55a2d6ea3594..7cc750af5a854d99a67a133461256047b69d1abf 100755 --- a/Projects/AnalysisBase/build_externals.sh +++ b/Projects/AnalysisBase/build_externals.sh @@ -1,5 +1,7 @@ #!/bin/bash # +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# # Script building all the externals necessary for the nightly build. # @@ -83,10 +85,8 @@ fi # Create some directories: mkdir -p ${BUILDDIR}/{src,install} -# Set some environment variables that the builds use internally: -export NICOS_PROJECT_VERSION=`cat ${thisdir}/version.txt` -export NICOS_ATLAS_RELEASE=${NICOS_PROJECT_VERSION} -export NICOS_PROJECT_RELNAME=${NICOS_PROJECT_VERSION} +# Get the version of AnalysisBase for the build. +version=`cat ${thisdir}/version.txt` # The directory holding the helper scripts: scriptsdir=${thisdir}/../../Build/AtlasBuildScripts @@ -114,6 +114,6 @@ export NICOS_PROJECT_HOME=$(cd ${BUILDDIR}/install;pwd)/AnalysisBaseExternals ${scriptsdir}/build_atlasexternals.sh \ -s ${BUILDDIR}/src/AnalysisBaseExternals \ -b ${BUILDDIR}/build/AnalysisBaseExternals \ - -i ${BUILDDIR}/install/AnalysisBaseExternals/${NICOS_PROJECT_VERSION} \ + -i ${BUILDDIR}/install \ -p AnalysisBaseExternals ${RPMOPTIONS} -t ${BUILDTYPE} \ - -v ${NICOS_PROJECT_VERSION} ${EXTRACMAKE[@]/#/-x } + -v ${version} ${EXTRACMAKE[@]/#/-x } diff --git a/Projects/AnalysisBase/externals.txt b/Projects/AnalysisBase/externals.txt index 62f5821fa15d106cad879025f58ce63d67c0f3ba..93215a7073946aed6ae3c1cd0b8c08acfba869d9 100644 --- a/Projects/AnalysisBase/externals.txt +++ b/Projects/AnalysisBase/externals.txt @@ -6,4 +6,4 @@ # forbidden. # The version of atlas/atlasexternals to use: -AnalysisBaseExternalsVersion = 2.0.55 +AnalysisBaseExternalsVersion = 2.0.56 diff --git a/Projects/AnalysisBase/version.txt b/Projects/AnalysisBase/version.txt index 8b74066182022f71750ed01028efa8953c1de511..de6c63efab2b6d55ae644f9acb26b1e61ec8e6f2 100644 --- a/Projects/AnalysisBase/version.txt +++ b/Projects/AnalysisBase/version.txt @@ -1 +1 @@ -22.0.3 +22.0.9 diff --git a/Projects/AnalysisTop/AnalysisTopReleaseEnvironmentConfig.cmake b/Projects/AnalysisTop/AnalysisTopReleaseEnvironmentConfig.cmake deleted file mode 100644 index 402d07410ae445789abe73ef3f61ac64bd6c2ffc..0000000000000000000000000000000000000000 --- a/Projects/AnalysisTop/AnalysisTopReleaseEnvironmentConfig.cmake +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -# $Id: AnalysisTopReleaseEnvironmentConfig.cmake 784551 2016-11-16 12:46:32Z krasznaa $ -# -# This file holds the compile and runtime environment configuration specific -# for the analysis release. -# - -# This is a standalone project, so set the appropriate compile flags: -add_definitions( -DROOTCORE ) -add_definitions( -DXAOD_STANDALONE ) -add_definitions( -DXAOD_ANALYSIS ) -add_definitions( -DROOTCORE_RELEASE_SERIES=25 ) - -# And the same variables for CMake as well: -set( ROOTCORE TRUE CACHE BOOL - "Flag specifying that this is a \"RootCore\" release" ) -set( XAOD_STANDALONE TRUE CACHE BOOL - "Flag specifying that this is a standalone build" ) -set( XAOD_ANALYSIS TRUE CACHE BOOL - "Flag specifying that this is an analysis release" ) - -# Vatriable that should be picked up by the environment creation code: -set( AnalysisTopReleaseEnvironment_ENVIRONMENT - SET ROOTCOREDIR \${AnalysisTop_DIR} - SET ROOTCOREBIN \${AnalysisTop_DIR} ) diff --git a/Projects/AnalysisTop/CMakeLists.txt b/Projects/AnalysisTop/CMakeLists.txt deleted file mode 100644 index 4215f92b2a1f8df2d61da6f9e60c97fa54503cf7..0000000000000000000000000000000000000000 --- a/Projects/AnalysisTop/CMakeLists.txt +++ /dev/null @@ -1,93 +0,0 @@ -# $Id: CMakeLists.txt 787093 2016-11-29 13:43:09Z krasznaa $ -# -# This is the main CMakeLists.txt file for building the AnalysisTop -# software release. -# - -# The minimum required CMake version: -cmake_minimum_required( VERSION 3.2 FATAL_ERROR ) - -# Read in the project's version from a file called version.txt. But let it be -# overridden from the command line if necessary. -file( READ ${CMAKE_SOURCE_DIR}/version.txt _version ) -string( STRIP ${_version} _version ) -set( ANALYSISBASE_PROJECT_VERSION ${_version} - CACHE STRING "Version of the AnalysisTop project to build" ) -unset( _version ) - -# This project is built on top of AnalysisBaseExternals: -find_package( AnalysisBaseExternals REQUIRED ) - -# Find Python. This is needed because AnalysisBaseExternals sets up -# a wrong value for PYTHONHOME. And nothing in AnalysisBase builds -# against Python to correct it. -find_package( Python COMPONENTS Interpreter ) - -# Add the project's modules directory to CMAKE_MODULE_PATH: -list( INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/modules ) -list( REMOVE_DUPLICATES CMAKE_MODULE_PATH ) - -# Install the files from modules/: -install( DIRECTORY ${CMAKE_SOURCE_DIR}/modules/ - DESTINATION cmake/modules - USE_SOURCE_PERMISSIONS - PATTERN ".svn" EXCLUDE - PATTERN "*~" EXCLUDE ) - -# Include the AnalysisBase specific function(s) (probably no need to make AnalysisTop specific): -include( AnalysisBaseFunctions ) - -# Set up the build/runtime environment: -set( AnalysisTopReleaseEnvironment_DIR ${CMAKE_SOURCE_DIR} ) -find_package( AnalysisTopReleaseEnvironment REQUIRED ) - -# Add the directory to the global include path, where the project -# will create the RootCore/Packages.h header: -include_directories( ${CMAKE_BINARY_DIR}/RootCore/include ) - -# Set up CTest: -atlas_ctest_setup() - - -# Declare project name and version -atlas_project( AnalysisTop ${ANALYSISTOP_PROJECT_VERSION} - USE AnalysisBaseExternals ${AnalysisBaseExternals_VERSION} - PROJECT_ROOT ${CMAKE_SOURCE_DIR}/../../ ) - -# Generate the RootCore/Packages.h header: -analysisbase_generate_release_header() - -# Set up the load_packages.C script: -configure_file( ${CMAKE_SOURCE_DIR}/scripts/load_packages.C.in - ${CMAKE_SCRIPT_OUTPUT_DIRECTORY}/load_packages.C @ONLY ) -install( FILES ${CMAKE_SCRIPT_OUTPUT_DIRECTORY}/load_packages.C - DESTINATION ${CMAKE_INSTALL_SCRIPTDIR} ) - -# Configure and install the post-configuration file: -configure_file( ${CMAKE_SOURCE_DIR}/PostConfig.cmake.in - ${CMAKE_BINARY_DIR}/PostConfig.cmake @ONLY ) -install( FILES ${CMAKE_BINARY_DIR}/PostConfig.cmake - DESTINATION ${CMAKE_INSTALL_CMAKEDIR} ) - -# Generate replacement rules for the installed paths: -set( _replacements ) -if( NOT "$ENV{NICOS_PROJECT_HOME}" STREQUAL "" ) - get_filename_component( _buildDir $ENV{NICOS_PROJECT_HOME} PATH ) - list( APPEND _replacements ${_buildDir} "\${AnalysisTop_DIR}/../../../.." ) -endif() -if( NOT "$ENV{NICOS_PROJECT_RELNAME}" STREQUAL "" ) - list( APPEND _replacements $ENV{NICOS_PROJECT_RELNAME} - "\${AnalysisTop_VERSION}" ) -endif() - -# Generate the environment configuration file(s): -lcg_generate_env( - SH_FILE ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}/env_setup.sh ) -lcg_generate_env( - SH_FILE ${CMAKE_BINARY_DIR}/env_setup_install.sh - REPLACE ${_replacements} ) -install( FILES ${CMAKE_BINARY_DIR}/env_setup_install.sh - DESTINATION . RENAME env_setup.sh ) - -# Set up the release packaging: -atlas_cpack_setup() diff --git a/Projects/AnalysisTop/PostConfig.cmake.in b/Projects/AnalysisTop/PostConfig.cmake.in deleted file mode 100644 index 10a35114b974f7117b3c52984d545e3692a7d72f..0000000000000000000000000000000000000000 --- a/Projects/AnalysisTop/PostConfig.cmake.in +++ /dev/null @@ -1,21 +0,0 @@ -# $Id: PostConfig.cmake.in 787191 2016-11-29 19:41:54Z krasznaa $ -# -# File setting up some basic properties for the installed analysis releases. -# - -# Make all compilation see the RootCore/Packages.h file: -include_directories( $ENV{AnalysisTop_DIR}/RootCore/include ) - -# This is a standalone project, so set the appropriate compile flags: -add_definitions( -DROOTCORE ) -add_definitions( -DXAOD_STANDALONE ) -add_definitions( -DXAOD_ANALYSIS ) -add_definitions( -DROOTCORE_RELEASE_SERIES=$ENV{ROOTCORE_RELEASE_SERIES} ) - -# And some variables for CMake as well: -set( ROOTCORE TRUE CACHE BOOL - "Flag specifying that this is a \"RootCore\" release" ) -set( XAOD_STANDALONE TRUE CACHE BOOL - "Flag specifying that this is a standalone build" ) -set( XAOD_ANALYSIS TRUE CACHE BOOL - "Flag specifying that this is an analysis release" ) diff --git a/Projects/AnalysisTop/build.sh b/Projects/AnalysisTop/build.sh deleted file mode 100755 index d6c1c0c88fdc2955ce68bf63a7229ff37e5280b8..0000000000000000000000000000000000000000 --- a/Projects/AnalysisTop/build.sh +++ /dev/null @@ -1,160 +0,0 @@ -#!/bin/bash -# -# Script for building the release on top of externals built using the -# script in this directory. -# -_time_() { local c="time -p " ; while test "X$1" != "X" ; do c+=" \"$1\"" ; shift; done; ( eval "$c" ) 2>&1 | sed "s,^real[[:space:]],time::${c}:: real ," ; } - -# Function printing the usage information for the script -usage() { - echo "Usage: build.sh [-t type] [-b dir] [-g generator] [-c] [-m] [-i] [-p] [-a]" - echo "" - echo " General flags:" - echo " -t: The (optional) CMake build type to use." - echo " -b: The (optional) build directory to use." - echo " -g: The (optional) CMake generator to use." - echo " -a: Abort on error." - echo " Build step selection:" - echo " -c: Execute the CMake step." - echo " -m: Execute the make/build step." - echo " -i: Execute the install step." - echo " -p: Execute the CPack step." - echo "" - echo " If none of the c, m, i or p options are set then the script will do" - echo " *all* steps. Otherwise only the enabled steps are run - it's your" - echo " reponsibility to ensure that precusors are in good shape" -} - -# Parse the command line arguments: -BUILDDIR="" -BUILDTYPE="RelWithDebInfo" -GENERATOR="Unix Makefiles" -EXE_CMAKE="" -EXE_MAKE="" -EXE_INSTALL="" -EXE_CPACK="" -NIGHTLY=true -while getopts ":t:b:g:hcmipa" opt; do - case $opt in - t) - BUILDTYPE=$OPTARG - ;; - b) - BUILDDIR=$OPTARG - ;; - g) - GENERATOR=$OPTARG - ;; - c) - EXE_CMAKE="1" - ;; - m) - EXE_MAKE="1" - ;; - i) - EXE_INSTALL="1" - ;; - p) - EXE_CPACK="1" - ;; - a) - NIGHTLY=false - ;; - h) - usage - exit 0 - ;; - :) - echo "Argument -$OPTARG requires a parameter!" - usage - exit 1 - ;; - ?) - echo "Unknown argument: -$OPTARG" - usage - exit 1 - ;; - esac -done - -if [ -z "$EXE_CMAKE" -a -z "$EXE_MAKE" -a -z "$EXE_INSTALL" -a \ - -z "$EXE_CPACK" ]; then - EXE_CMAKE="1" - EXE_MAKE="1" - EXE_INSTALL="1" - EXE_CPACK="1" -fi - -# Stop on errors from here on out: -set -e -set -o pipefail - -# Source in our environment -AnalysisTopSrcDir=$(dirname ${BASH_SOURCE[0]}) -if [ -z "$BUILDDIR" ]; then - BUILDDIR=${AnalysisTopSrcDir}/../../../build -fi -mkdir -p ${BUILDDIR} -BUILDDIR=$(cd ${BUILDDIR} && pwd) -source $AnalysisTopSrcDir/build_env.sh -b $BUILDDIR >& ${BUILDDIR}/build_env.log -cat ${BUILDDIR}/build_env.log - -# create the actual build directory -mkdir -p ${BUILDDIR}/build/AnalysisTop -cd ${BUILDDIR}/build/AnalysisTop - -# CMake: -if [ -n "$EXE_CMAKE" ]; then - # Remove the CMakeCache.txt file, to force CMake to find externals - # from scratch in an incremental build. - rm -f CMakeCache.txt - - # The package specific log files can only be generated with the Makefile - # and Ninja generators. Very notably it doesn't work with IDEs in general. - USE_LAUNCHERS="" - if [ "${GENERATOR}" = "Ninja" ] || [ "${GENERATOR}" = "Unix Makefiles" ]; then - USE_LAUNCHERS=-DCTEST_USE_LAUNCHERS:BOOL=TRUE - fi - - # Now run the actual CMake configuration: - _time_ cmake -G "${GENERATOR}" \ - -DCMAKE_BUILD_TYPE:STRING=${BUILDTYPE} \ - ${USE_LAUNCHERS} \ - ${AnalysisTopSrcDir} 2>&1 | tee cmake_config.log -fi - -# For nightly builds we want to get as far as we can: -if [ "$NIGHTLY" = true ]; then - # At this point stop worrying about errors: - set +e -fi - -# Run the build: -if [ -n "$EXE_MAKE" ]; then - if [ "$NIGHTLY" = true ]; then - # In order to build the project in a nightly setup, allowing for some - # build steps to fail while still continuing, we need to use "make" - # directly. Only allowing the usage of the Makefile generator. - _time_ make -k 2>&1 | tee cmake_build.log - else - # However in a non-nightly setup we can just rely on CMake to start - # the build for us. In this case we can use any generator we'd like - # for the build. Notice however that the installation step can still - # be only done correctly by using GNU Make directly. - _time_ cmake --build . 2>&1 | tee cmake_build.log - fi -fi - -# Install the results: -if [ -n "$EXE_INSTALL" ]; then - _time_ make install/fast \ - DESTDIR=${BUILDDIR}/install/AnalysisTop/${NICOS_PROJECT_VERSION} \ - 2>&1 | tee cmake_install.log -fi - -# Build an RPM for the release: -if [ -n "$EXE_CPACK" ]; then - _time_ cpack 2>&1 | tee cmake_cpack.log - FILES=$(ls AnalysisTop*.rpm AnalysisTop*.dmg AnalysisTop*.tar.gz) - cp ${FILES} ${BUILDDIR}/ -fi diff --git a/Projects/AnalysisTop/build_env.sh b/Projects/AnalysisTop/build_env.sh deleted file mode 100644 index e14984ea27089df9c646057bc71d3c2c8bd50ca4..0000000000000000000000000000000000000000 --- a/Projects/AnalysisTop/build_env.sh +++ /dev/null @@ -1,88 +0,0 @@ -# This script sets up the build enironment for an AnalysisTop -# build, on top of a built set of externals. -# -# This script is kept separate from the build.sh -# wrapper so it can be sourced separately from it when -# clients want to manage their own build and just want -# to setup the build environment - -env_usage() { - echo "Usage: build_env.sh [-b build dir]" -} - -# This function actually sets up the environment for us -# (factorise it here in case it needs skipped) -env_setup() { - - # As this script can be sourced we need to support zsh and - # possibly other Bourne shells - if [ "x${BASH_SOURCE[0]}" = "x" ]; then - # This trick should do the right thing under ZSH: - thisdir=$(dirname `print -P %x`) - if [ $? != 0 ]; then - echo "ERROR: This script must be sourced from BASH or ZSH" - return 1 - fi - else - # The BASH solution is a bit more straight forward: - thisdir=$(dirname ${BASH_SOURCE[0]}) - fi - AnalysisTopSrcDir=$(cd ${thisdir};pwd) - - # The directory holding the helper scripts: - scriptsdir=${AnalysisTopSrcDir}/../../Build/AtlasBuildScripts - - # Check if the user specified any source/build directories: - if [ "$BUILDDIR" = "" ]; then - BUILDDIR=${AnalysisTopSrcDir}/../../../build - fi - - # Set up the environment for the build: - export NICOS_PROJECT_VERSION=`cat ${AnalysisTopSrcDir}/version.txt` - export NICOS_ATLAS_RELEASE=${NICOS_PROJECT_VERSION} - export NICOS_PROJECT_RELNAME=${NICOS_PROJECT_VERSION} - export NICOS_PROJECT_HOME=$(cd ${BUILDDIR}/install;pwd)/AnalysisTop - - # Set up the AnalysisBaseExternals project: - extDir=${BUILDDIR}/install/AnalysisBaseExternals/${NICOS_PROJECT_VERSION}/InstallArea - if [ ! -d ${extDir} ]; then - echo "Didn't find the AnalysisBaseExternals project under ${extDir}" - fi - echo "Setting up AnalysisBaseExternals from: ${extDir}" - source ${extDir}/*/setup.sh -} - -# we need to reset the option index as we are sourcing this script -# http://stackoverflow.com/questions/23581368/bug-in-parsing-args-with-getopts-in-bash -OPTIND=1 - -# Parse the command line arguments: -BUILDDIR="" -while getopts "b:h" opt; do - case $opt in - b) - BUILDDIR=$OPTARG - ;; - h) - env_usage - ABORT=1 - ;; - :) - echo "Argument -$OPTARG requires a parameter!" - env_usage - ABORT=1 - ;; - ?) - echo "Unknown argument: -$OPTARG" - env_usage - ABORT=1 - ;; - esac -done - -# Put a big wrapper around bad argument case, because -# a sourced script should not call "exit". This is quite -# annoying... -if [ -z "$ABORT" ]; then - env_setup -fi diff --git a/Projects/AnalysisTop/build_externals.sh b/Projects/AnalysisTop/build_externals.sh deleted file mode 100755 index 9ed0cf276851c34c9958f21e246526008b5d8a2b..0000000000000000000000000000000000000000 --- a/Projects/AnalysisTop/build_externals.sh +++ /dev/null @@ -1,112 +0,0 @@ -#!/bin/bash -# -# Script building all the externals necessary for the nightly build. -# - -# Stop on errors: -set -e - -# Function printing the usage information for the script -usage() { - echo "Usage: build_externals.sh [-t build_type] [-b build_dir] [-f] [-c]" - echo " -f: Force rebuild of externals, otherwise if script" - echo " finds an external build present it will simply exit" - echo " -c: Build the externals for the continuous integration (CI) system," - echo " skipping the build of the externals RPMs." - echo "If a build_dir is not given the default is '../build'" - echo "relative to the athena checkout" -} - -# Parse the command line arguments: -BUILDDIR="" -BUILDTYPE="RelWithDebInfo" -FORCE="" -CI="" -while getopts ":t:b:fch" opt; do - case $opt in - t) - BUILDTYPE=$OPTARG - ;; - b) - BUILDDIR=$OPTARG - ;; - f) - FORCE="1" - ;; - c) - CI="1" - ;; - h) - usage - exit 0 - ;; - :) - echo "Argument -$OPTARG requires a parameter!" - usage - exit 1 - ;; - ?) - echo "Unknown argument: -$OPTARG" - usage - exit 1 - ;; - esac -done - -# We are in BASH, get the path of this script in a simple way: -thisdir=$(dirname ${BASH_SOURCE[0]}) -thisdir=$(cd ${thisdir};pwd) - -# Go to the main directory of the repository: -cd ${thisdir}/../.. - -# Check if the user specified any source/build directories: -if [ "$BUILDDIR" = "" ]; then - BUILDDIR=${thisdir}/../../../build -fi -mkdir -p ${BUILDDIR} -BUILDDIR=$(cd $BUILDDIR; pwd) - -if [ "$FORCE" = "1" ]; then - echo "Force deleting existing build area..." - rm -fr ${BUILDDIR}/install/AnalysisBaseExternals - rm -fr ${BUILDDIR}/src/AnalysisBaseExternals - rm -fr ${BUILDDIR}/build/AnalysisBaseExternals -fi - -# Create some directories: -mkdir -p ${BUILDDIR}/{src,install} - -# Set some environment variables that the builds use internally: -export NICOS_PROJECT_VERSION=`cat ${thisdir}/version.txt` -export NICOS_ATLAS_RELEASE=${NICOS_PROJECT_VERSION} -export NICOS_PROJECT_RELNAME=${NICOS_PROJECT_VERSION} - -# The directory holding the helper scripts: -scriptsdir=${thisdir}/../../Build/AtlasBuildScripts -scriptsdir=$(cd ${scriptsdir}; pwd) - -# Flag for triggering the build of RPMs for the externals: -RPMOPTIONS="-r ${BUILDDIR}" -if [ "$CI" = "1" ]; then - RPMOPTIONS= -fi - -# Read in the tag/branch to use for AnalysisBaseExternals: -AnalysisBaseExternalsVersion=$(awk '/^AnalysisBaseExternalsVersion/{print $3}' ${thisdir}/externals.txt) - -set -o pipefail - -# Check out AnalysisBaseExternals from the right branch/tag: -${scriptsdir}/checkout_atlasexternals.sh \ - -t ${AnalysisBaseExternalsVersion} \ - -s ${BUILDDIR}/src/AnalysisBaseExternals 2>&1 | tee ${BUILDDIR}/src/checkout.AnalysisBaseExternals.log - -# Build AnalysisBaseExternals: -export NICOS_PROJECT_HOME=$(cd ${BUILDDIR}/install;pwd)/AnalysisBaseExternals -${scriptsdir}/build_atlasexternals.sh \ - -s ${BUILDDIR}/src/AnalysisBaseExternals \ - -b ${BUILDDIR}/build/AnalysisBaseExternals \ - -i ${BUILDDIR}/install/AnalysisBaseExternals/${NICOS_PROJECT_VERSION} \ - -p AnalysisBaseExternals ${RPMOPTIONS} -t ${BUILDTYPE} \ - -v ${NICOS_PROJECT_VERSION} diff --git a/Projects/AnalysisTop/externals.txt b/Projects/AnalysisTop/externals.txt deleted file mode 100644 index 35285d2322e243eb12d7184dc55958c2da5b38cb..0000000000000000000000000000000000000000 --- a/Projects/AnalysisTop/externals.txt +++ /dev/null @@ -1,4 +0,0 @@ -# Versions of the various externals to build before starting the build of -# this project, when doing a full stack nightly build. - -AnalysisBaseExternalsVersion = 2.0.55 diff --git a/Projects/AnalysisTop/modules/AnalysisBaseFunctions.cmake b/Projects/AnalysisTop/modules/AnalysisBaseFunctions.cmake deleted file mode 100644 index 1260c3e73a9237ffa1ef00487a7ce434ba4a4da4..0000000000000000000000000000000000000000 --- a/Projects/AnalysisTop/modules/AnalysisBaseFunctions.cmake +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -# $Id: AnalysisBaseFunctions.cmake 787191 2016-11-29 19:41:54Z krasznaa $ -# -# This module collects CMake functions that are useful when setting up an -# analysis release. -# - -# Function generating a RootCore/Packages.h header -# -# This function should be called in the main CMakeLists.txt file of the -# project, after the atlas_project(...) call, in order to generate a header file -# called "RootCore/Packages.h", in the format that RootCore generates it in. -# With one define statement per package that was found in he release. -# -# Usage: analysisbase_generate_release_header() -# -function( analysisbase_generate_release_header ) - - # Get the list of packages that were found: - get_property( _packages GLOBAL PROPERTY ATLAS_EXPORTED_PACKAGES ) - - # Generate a "RootCore/Package.h" file, in the same format that - # RootCore does/did: - set( _packagesFileName - ${CMAKE_BINARY_DIR}/RootCore/include/RootCore/Packages.h ) - file( MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/RootCore/include/RootCore ) - file( WRITE ${_packagesFileName} - "// Auto-generated file, please do not edit\n" - "#ifndef ROOTCORE_PACKAGES_H\n" - "#define ROOTCORE_PACKAGES_H\n\n" ) - foreach( pkgname ${_packages} ) - file( APPEND ${_packagesFileName} - "#define ROOTCORE_PACKAGE_${pkgname}\n" ) - endforeach() - file( APPEND ${_packagesFileName} "\n#endif // not ROOTCORE_PACKAGES_H\n" ) - unset( _packagesFileName ) - unset( _packages ) - - # Install the header in the usual place: - install( DIRECTORY ${CMAKE_BINARY_DIR}/RootCore/include/ - DESTINATION RootCore/include ) - -endfunction( analysisbase_generate_release_header ) diff --git a/Projects/AnalysisTop/package_filters.txt b/Projects/AnalysisTop/package_filters.txt deleted file mode 100644 index 19f0bfb9a080d4f586292425c53f1aff2da7bc52..0000000000000000000000000000000000000000 --- a/Projects/AnalysisTop/package_filters.txt +++ /dev/null @@ -1,112 +0,0 @@ -# -# Packages to build as part of AnalysisBase: -# -+ AsgExternal/Asg_Test -+ AtlasTest/TestTools -+ Calorimeter/CaloGeoHelpers -+ Control/AthContainersInterfaces -+ Control/AthContainers -+ Control/AthLinksSA -+ Control/AthToolSupport/.* -+ Control/CxxUtils -+ Control/xAODRootAccess.* -+ DataQuality/GoodRunsLists -+ DetectorDescription/GeoPrimitives -+ DetectorDescription/IRegionSelector -+ DetectorDescription/RoiDescriptor -+ Event/EventPrimitives -+ Event/FourMomUtils -- Event/xAOD/.*AthenaPool -+ Event/xAOD/xAODMetaDataCnv -+ Event/xAOD/xAODTriggerCnv -- Event/xAOD/.*Cnv -+ Event/xAOD/.* -+ Generators/TruthUtils -+ InnerDetector/InDetRecTools/InDetTrackSelectionTool -+ InnerDetector/InDetRecTools/TrackVertexAssociationTool -+ MuonSpectrometer/MuonIdHelpers -+ PhysicsAnalysis/AnalysisCommon/AssociationUtils -+ PhysicsAnalysis/AnalysisCommon/CPAnalysisExamples -+ PhysicsAnalysis/AnalysisCommon/FsrUtils -+ PhysicsAnalysis/AnalysisCommon/IsolationSelection -+ PhysicsAnalysis/AnalysisCommon/PATCore -+ PhysicsAnalysis/AnalysisCommon/PATInterfaces -+ PhysicsAnalysis/AnalysisCommon/PMGTools -+ PhysicsAnalysis/AnalysisCommon/ParticleJetTools -+ PhysicsAnalysis/AnalysisCommon/PileupReweighting -+ PhysicsAnalysis/AnalysisCommon/ReweightUtils -+ PhysicsAnalysis/D3PDTools/.* -- PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools -+ PhysicsAnalysis/ElectronPhotonID/.* -+ PhysicsAnalysis/HiggsPhys/Run2/HZZ/Tools/ZMassConstraint -+ PhysicsAnalysis/Interfaces/.* -+ PhysicsAnalysis/JetMissingEtID/JetSelectorTools -+ PhysicsAnalysis/JetPhys/SemileptonicCorr -+ PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/CalibrationDataInterface -+ PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency -+ PhysicsAnalysis/MCTruthClassifier -+ PhysicsAnalysis/MuonID/MuonIDAnalysis/.* -+ PhysicsAnalysis/MuonID/MuonSelectorTools -+ PhysicsAnalysis/SUSYPhys/SUSYTools -+ PhysicsAnalysis/TauID/DiTauMassTools -+ PhysicsAnalysis/TauID/TauAnalysisTools -+ PhysicsAnalysis/TauID/TauCorrUncert -+ PhysicsAnalysis/TopPhys/QuickAna -+ PhysicsAnalysis/TrackingID/.* -+ Reconstruction/EventShapes/EventShapeInterface -- Reconstruction/Jet/JetAnalysisTools/JetAnalysisEDM -- Reconstruction/Jet/JetEvent.* -- Reconstruction/Jet/JetMonitoring -+ Reconstruction/Jet/JetReclustering -- Reconstruction/Jet/JetRec.+ -- Reconstruction/Jet/JetSimTools -- Reconstruction/Jet/JetValidation -+ Reconstruction/Jet/Jet.* -+ Reconstruction/MET/METInterface -+ Reconstruction/MET/METUtilities -+ Reconstruction/MVAUtils -+ Reconstruction/PFlow/PFlowUtils -+ Reconstruction/egamma/egammaLayerRecalibTool -+ Reconstruction/egamma/egammaMVACalib -+ Reconstruction/egamma/egammaRecEvent -+ Reconstruction/tauRecTools -+ Tools/PathResolver -+ Trigger/TrigAnalysis/TrigAnalysisInterfaces -+ Trigger/TrigAnalysis/TrigBunchCrossingTool -+ Trigger/TrigAnalysis/TrigDecisionTool -+ Trigger/TrigAnalysis/TrigTauAnalysis/TrigTauMatching -+ Trigger/TrigAnalysis/TriggerMatchingTool -+ Trigger/TrigConfiguration/TrigConfBase -+ Trigger/TrigConfiguration/TrigConfHLTData -+ Trigger/TrigConfiguration/TrigConfInterfaces -+ Trigger/TrigConfiguration/TrigConfL1Data -+ Trigger/TrigConfiguration/TrigConfxAOD -+ Trigger/TrigEvent/TrigDecisionInterface -+ Trigger/TrigEvent/TrigNavStructure -+ Trigger/TrigEvent/TrigRoiConversion -+ Trigger/TrigEvent/TrigSteeringEvent -+ Trigger/TrigValidation/TrigAnalysisTest -# -# Packages to build as part of AnalysisTop: -# -+ PhysicsAnalysis/UpgradePhys/SmearingFunctions/UpgradePerformanceFunctions -+ PhysicsAnalysis/TopPhys/TopPhysUtils/TopDataPreparation -+ PhysicsAnalysis/TopPhys/xAOD/TopAnalysis -+ PhysicsAnalysis/TopPhys/xAOD/TopCPTools -+ PhysicsAnalysis/TopPhys/xAOD/TopConfiguration -+ PhysicsAnalysis/TopPhys/xAOD/TopCorrections -+ PhysicsAnalysis/TopPhys/xAOD/TopEvent -+ PhysicsAnalysis/TopPhys/xAOD/TopEventReconstructionTools -+ PhysicsAnalysis/TopPhys/xAOD/TopEventSelectionTools -+ PhysicsAnalysis/TopPhys/xAOD/TopExamples -+ PhysicsAnalysis/TopPhys/xAOD/TopFakes -+ PhysicsAnalysis/TopPhys/xAOD/TopHLUpgrade -+ PhysicsAnalysis/TopPhys/xAOD/TopJetSubstructure -+ PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools -+ PhysicsAnalysis/TopPhys/xAOD/TopParticleLevel -+ PhysicsAnalysis/TopPhys/xAOD/TopPartons -+ PhysicsAnalysis/TopPhys/xAOD/TopSystematicObjectMaker -# -# No other packages -# -- .* diff --git a/Projects/AnalysisTop/project.cmake b/Projects/AnalysisTop/project.cmake deleted file mode 100644 index 76571324d7e4f80cac6ee342ad9db212612dfa4b..0000000000000000000000000000000000000000 --- a/Projects/AnalysisTop/project.cmake +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -#Project file for AnalysisTop -set( PROJECT_NAME "AnalysisTop" ) -set( PROJECT_VERSION "2.6.3" ) - -# Other projects that this one depends on -set( PROJECT_DEPS "AnalysisTopExternals" "2.6.3" ) diff --git a/Projects/AnalysisTop/scripts/load_packages.C.in b/Projects/AnalysisTop/scripts/load_packages.C.in deleted file mode 100644 index 0b0d21db72d81fdad07a4277867bb9c861ee515b..0000000000000000000000000000000000000000 --- a/Projects/AnalysisTop/scripts/load_packages.C.in +++ /dev/null @@ -1,48 +0,0 @@ -// $Id: load_packages.C.in 784551 2016-11-16 12:46:32Z krasznaa $ -// -// This is a much simplified version of the RootCore script with the same -// name, basically just here to provide the existing scripts/tests with a -// file that they can use. - -// System include(s): -#include - -// ROOT include(s): -#include -#include - -/// Function setting up interactive ROOT to use the analysis release -/// -/// In order to use macros or PyROOT scripts that make use of symbols -/// defined in the analysis release, the user has to execute this macro. -/// It takes care of setting up the compilation options of ACLiC, and -/// of calling xAOD::Init(). -/// -/// @param options An unused parameter, just to mimic the RootCore function -/// -void load_packages( const char* options = "" ) { - - // Make sure that some reasonable environment is set up: - const char* ROOTCOREDIR = gSystem->Getenv( "ROOTCOREDIR" ); - if( ! ROOTCOREDIR ) { - throw std::runtime_error( "ROOTCOREDIR not set, please set " - "the environment" ); - } - const std::string dir = ROOTCOREDIR; - - const char* ROOTCOREBIN = gSystem->Getenv( "ROOTCOREBIN" ); - if( ! ROOTCOREBIN ) { - throw std::runtime_error( "ROOTCOREBIN not set, please set " - "the environment"); - } - const std::string bin = ROOTCOREBIN; - - // Set the compilation options for ACLiC: - gSystem->AddIncludePath( "@CMAKE_CXX_FLAGS@" ); - - // Load the xAODRootAccess library, in a hard-coded way: - gSystem->Load( "libxAODRootAccess" ); - gROOT->ProcessLine( "xAOD::Init().ignore()" ); - - return; -} diff --git a/Projects/AnalysisTop/version.txt b/Projects/AnalysisTop/version.txt deleted file mode 100644 index 8b74066182022f71750ed01028efa8953c1de511..0000000000000000000000000000000000000000 --- a/Projects/AnalysisTop/version.txt +++ /dev/null @@ -1 +0,0 @@ -22.0.3 diff --git a/Projects/AthDataQuality/CMakeLists.txt b/Projects/AthDataQuality/CMakeLists.txt index 4b025ef346236ffda1d00d2f07eddda39c75d08e..fd720da5f73d97f7a0688cdfdc7fa1d47024d50f 100644 --- a/Projects/AthDataQuality/CMakeLists.txt +++ b/Projects/AthDataQuality/CMakeLists.txt @@ -1,13 +1,10 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -# Set the minimum required CMake version: +# Set up the project. cmake_minimum_required( VERSION 3.6 ) - -# Read in the project's version from a file called version.txt. But let it be -# overridden from the command line if necessary. file( READ ${CMAKE_SOURCE_DIR}/version.txt _version ) string( STRIP ${_version} _version ) -set( ATHDATAQUALITY_PROJECT_VERSION ${_version} - CACHE STRING "Version of the AthDataQuality project to build" ) +project( AthDataQuality VERSION ${_version} LANGUAGES CXX ) unset( _version ) # Set the version of tdaq-common to use for the build: @@ -41,9 +38,7 @@ list( INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake ) atlas_ctest_setup() # Set up a work directory project: -atlas_project( AthDataQuality ${ATHDATAQUALITY_PROJECT_VERSION} - PROJECT_ROOT ${CMAKE_SOURCE_DIR}/../../ - LANGUAGES CXX ) +atlas_project( PROJECT_ROOT ${CMAKE_SOURCE_DIR}/../../ ) # Generate the environment setup for the externals, to be used during the build: lcg_generate_env( SH_FILE ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}/env_setup.sh ) @@ -55,10 +50,6 @@ if( NOT "$ENV{NICOS_PROJECT_HOME}" STREQUAL "" ) list( APPEND _replacements ${_buildDir} "\${AthDataQuality_DIR}/../../../.." ) endif() -if( NOT "$ENV{NICOS_PROJECT_RELNAME}" STREQUAL "" ) - list( APPEND _replacements $ENV{NICOS_PROJECT_RELNAME} - "\${AthDataQuality_VERSION}" ) -endif() if( NOT "$ENV{TDAQ_RELEASE_BASE}" STREQUAL "" ) list( APPEND _replacements $ENV{TDAQ_RELEASE_BASE} "\${TDAQ_RELEASE_BASE}" ) diff --git a/Projects/AthDataQuality/build.sh b/Projects/AthDataQuality/build.sh index 23b0e40c99822949ff2280fd749012327e9a9f5d..fcba1f9b53b78714a22eb54db0ef4180e41b1ac0 100755 --- a/Projects/AthDataQuality/build.sh +++ b/Projects/AthDataQuality/build.sh @@ -1,5 +1,7 @@ #!/bin/bash # +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# # Script for building the release on top of externals built using one of the # scripts in this directory. # @@ -137,7 +139,7 @@ fi # Install the results: if [ -n "$EXE_INSTALL" ]; then - { DESTDIR=${BUILDDIR}/install/AthDataQuality/${NICOS_PROJECT_VERSION} _time_ ${BUILDTOOL} ${INSTALLRULE}; } \ + { DESTDIR=${BUILDDIR}/install _time_ ${BUILDTOOL} ${INSTALLRULE}; } \ 2>&1 | tee cmake_install.log fi diff --git a/Projects/AthDataQuality/build_env.sh b/Projects/AthDataQuality/build_env.sh index 47d6e42371baa676f7af00dd1f9fd8f8e0987f2f..121bcf4fd35a7fc95d1d5d585c3b2c5ede071329 100644 --- a/Projects/AthDataQuality/build_env.sh +++ b/Projects/AthDataQuality/build_env.sh @@ -1,3 +1,5 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# # This script sets up the build enironment for an AthDataQuality # build. # @@ -41,9 +43,6 @@ env_setup() { fi # Set up the environment for the build: - export NICOS_PROJECT_VERSION=`cat ${AthDataQualitySrcDir}/version.txt` - export NICOS_ATLAS_RELEASE=${NICOS_PROJECT_VERSION} - export NICOS_PROJECT_RELNAME=${NICOS_PROJECT_VERSION} export NICOS_PROJECT_HOME=${BUILDDIR}/install/AthDataQuality # Set up the environment variables for finding LCG and the TDAQ externals: diff --git a/Projects/AthDataQuality/build_externals.sh b/Projects/AthDataQuality/build_externals.sh index 2c0283497922c64eb1ffbed4b48d46ac4ac00bd7..d5e0794689ef5ec8c41011bcbff983ef6905d7a7 100755 --- a/Projects/AthDataQuality/build_externals.sh +++ b/Projects/AthDataQuality/build_externals.sh @@ -1,5 +1,7 @@ #!/bin/bash # +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# # Script building all the externals necessary for the nightly build. # @@ -79,11 +81,6 @@ BUILDDIR=$(cd $BUILDDIR; pwd) # Create some directories: mkdir -p ${BUILDDIR}/src -# Set some environment variables that the builds use internally: -export NICOS_PROJECT_VERSION=`cat ${thisdir}/version.txt` -export NICOS_ATLAS_RELEASE=${NICOS_PROJECT_VERSION} -export NICOS_PROJECT_RELNAME=${NICOS_PROJECT_VERSION} - # The directory holding the helper scripts: scriptsdir=${thisdir}/../../Build/AtlasBuildScripts scriptsdir=$(cd ${scriptsdir}; pwd) diff --git a/Projects/AthDataQuality/externals.txt b/Projects/AthDataQuality/externals.txt index 782a09a97629c4de45a04358a4d2daec492e9f98..3fae03167e2eec37abff03bd6b7a1a5bc15397f7 100644 --- a/Projects/AthDataQuality/externals.txt +++ b/Projects/AthDataQuality/externals.txt @@ -5,4 +5,4 @@ # an "origin/" prefix before it. For tags however this is explicitly # forbidden. -AtlasExternalsVersion = 2.0.55 +AtlasExternalsVersion = 2.0.56 diff --git a/Projects/AthSimulation/CMakeLists.txt b/Projects/AthSimulation/CMakeLists.txt index 8706bd2c35ba56e7f29513cd38385826d184f8c2..844ed2835d5c328f7b559a61133605dcaa79137c 100644 --- a/Projects/AthSimulation/CMakeLists.txt +++ b/Projects/AthSimulation/CMakeLists.txt @@ -1,13 +1,10 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -# The minimum required CMake version: +# Set up the project. cmake_minimum_required( VERSION 3.6 ) - -# Read in the project's version from a file called version.txt. But let it be -# overridden from the command line if necessary. file( READ ${CMAKE_SOURCE_DIR}/version.txt _version ) string( STRIP ${_version} _version ) -set( ATHSIMULATION_PROJECT_VERSION ${_version} - CACHE STRING "Version of the AthSimulation project to build" ) +project( AthSimulation VERSION ${_version} LANGUAGES C CXX Fortran ) unset( _version ) # Find the ATLAS CMake code: @@ -50,10 +47,8 @@ list( INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake ) atlas_ctest_setup() # Declare project name and version -atlas_project( AthSimulation ${ATHSIMULATION_PROJECT_VERSION} - USE AthSimulationExternals ${AthSimulationExternals_VERSION} - PROJECT_ROOT ${CMAKE_SOURCE_DIR}/../../ - LANGUAGES C CXX Fortran ) +atlas_project( USE AthSimulationExternals ${AthSimulationExternals_VERSION} + PROJECT_ROOT ${CMAKE_SOURCE_DIR}/../../ ) # Install the external configurations: install( DIRECTORY ${CMAKE_SOURCE_DIR}/externals @@ -68,10 +63,6 @@ if( NOT "$ENV{NICOS_PROJECT_HOME}" STREQUAL "" ) get_filename_component( _buildDir $ENV{NICOS_PROJECT_HOME} PATH ) list( APPEND _replacements ${_buildDir} "\${AthSimulation_DIR}/../../../.." ) endif() -if( NOT "$ENV{NICOS_PROJECT_RELNAME}" STREQUAL "" ) - list( APPEND _replacements $ENV{NICOS_PROJECT_RELNAME} - "\${AthSimulation_VERSION}" ) -endif() # Now generate and install the installed setup files: lcg_generate_env( diff --git a/Projects/AthSimulation/build.sh b/Projects/AthSimulation/build.sh index 305f6b62e9301bf2243afc86ccd21dba21eaa3e4..488cb89a8196f1572ac10384e8941252fcf1b941 100755 --- a/Projects/AthSimulation/build.sh +++ b/Projects/AthSimulation/build.sh @@ -1,5 +1,7 @@ #!/bin/bash # +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# # Script for building the release on top of externals built using one of the # scripts in this directory. # @@ -140,7 +142,7 @@ fi # Install the results: if [ -n "$EXE_INSTALL" ]; then - { DESTDIR=${BUILDDIR}/install/AthSimulation/${NICOS_PROJECT_VERSION} _time_ ${BUILDTOOL} ${INSTALLRULE}; } \ + { DESTDIR=${BUILDDIR}/install _time_ ${BUILDTOOL} ${INSTALLRULE}; } \ 2>&1 | tee cmake_install.log fi diff --git a/Projects/AthSimulation/build_env.sh b/Projects/AthSimulation/build_env.sh index 42c66666b0eeeb0affc52d3c31a9d64838913b86..01a4d8cd1aaa0eb8740754f441251e9a685a4efd 100644 --- a/Projects/AthSimulation/build_env.sh +++ b/Projects/AthSimulation/build_env.sh @@ -1,3 +1,5 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# # This script sets up the build enironment for an AthSimulation # build, on top of a built set of externals (including Gaudi) # @@ -40,17 +42,17 @@ env_setup() { BUILDDIR=${AthSimulationSrcDir}/../../../build fi + # Get the version of AthSimulation for the build. + version=`cat ${AthSimulationSrcDir}/version.txt` + # Set up the environment for the build: - export NICOS_PROJECT_VERSION=`cat ${AthSimulationSrcDir}/version.txt` - export NICOS_ATLAS_RELEASE=${NICOS_PROJECT_VERSION} - export NICOS_PROJECT_RELNAME=${NICOS_PROJECT_VERSION} export NICOS_PROJECT_HOME=$(cd ${BUILDDIR}/install;pwd)/AthSimulation # Set up the environment variables for finding LCG externals: source ${scriptsdir}/LCG_RELEASE_BASE.sh # Set up the AthSimulationExternals project: - extDir=${BUILDDIR}/install/AthSimulationExternals/${NICOS_PROJECT_VERSION}/InstallArea + extDir=${BUILDDIR}/install/AthSimulationExternals/${version}/InstallArea if [ ! -d ${extDir} ]; then echo "Didn't find the AthSimulationExternals project under ${extDir}" fi @@ -62,7 +64,7 @@ env_setup() { platform=$(cd ${extDir};ls) # Point to Gaudi: - export GAUDI_ROOT=${BUILDDIR}/install/GAUDI/${NICOS_PROJECT_VERSION}/InstallArea/${platform} + export GAUDI_ROOT=${BUILDDIR}/install/GAUDI/${version}/InstallArea/${platform} echo "Taking Gaudi from: ${GAUDI_ROOT}" cd $startdir diff --git a/Projects/AthSimulation/build_externals.sh b/Projects/AthSimulation/build_externals.sh index 63b9fee3d296e73088828e9747b6f5d14e078ec6..0c4833b077ae3ae19fef7dfbbb7899367f5cbbe4 100755 --- a/Projects/AthSimulation/build_externals.sh +++ b/Projects/AthSimulation/build_externals.sh @@ -1,5 +1,7 @@ #!/bin/bash # +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# # Script building all the externals necessary for the nightly build. # @@ -88,10 +90,8 @@ fi # Create some directories: mkdir -p ${BUILDDIR}/{src,install} -# Set some environment variables that the builds use internally: -export NICOS_PROJECT_VERSION=`cat ${thisdir}/version.txt` -export NICOS_ATLAS_RELEASE=${NICOS_PROJECT_VERSION} -export NICOS_PROJECT_RELNAME=${NICOS_PROJECT_VERSION} +# Get the version of AthSimulation for the build. +version=`cat ${thisdir}/version.txt` # The directory holding the helper scripts: scriptsdir=${thisdir}/../../Build/AtlasBuildScripts @@ -115,17 +115,16 @@ ${scriptsdir}/checkout_atlasexternals.sh \ -s ${BUILDDIR}/src/AthSimulationExternals 2>&1 | tee ${BUILDDIR}/src/checkout.AthSimulationExternals.log # Build AthSimulationExternals: -export NICOS_PROJECT_HOME=$(cd ${BUILDDIR}/install;pwd)/AthSimulationExternals ${scriptsdir}/build_atlasexternals.sh \ -s ${BUILDDIR}/src/AthSimulationExternals \ -b ${BUILDDIR}/build/AthSimulationExternals \ - -i ${BUILDDIR}/install/AthSimulationExternals/${NICOS_PROJECT_VERSION} \ + -i ${BUILDDIR}/install \ -p AthSimulationExternals ${RPMOPTIONS} -t ${BUILDTYPE} \ - ${EXTRACMAKE[@]/#/-x } -v ${NICOS_PROJECT_VERSION} || ((ERROR_COUNT++)) + ${EXTRACMAKE[@]/#/-x } -v ${version} || ((ERROR_COUNT++)) # Get the "platform name" from the directory created by the AthSimulationExternals # build: -platform=$(cd ${BUILDDIR}/install/AthSimulationExternals/${NICOS_PROJECT_VERSION}/InstallArea;ls) +platform=$(cd ${BUILDDIR}/install/AthSimulationExternals/${version}/InstallArea;ls) # Read in the tag/branch to use for Gaudi: GaudiVersion=$(awk '/^GaudiVersion/{print $3}' ${thisdir}/externals.txt) @@ -136,12 +135,12 @@ ${scriptsdir}/checkout_Gaudi.sh \ -s ${BUILDDIR}/src/GAUDI 2>&1 | tee ${BUILDDIR}/src/checkout.GAUDI.log # Build Gaudi: -export NICOS_PROJECT_HOME=$(cd ${BUILDDIR}/install;pwd)/GAUDI ${scriptsdir}/build_Gaudi.sh \ -s ${BUILDDIR}/src/GAUDI \ -b ${BUILDDIR}/build/GAUDI \ - -i ${BUILDDIR}/install/GAUDI/${NICOS_PROJECT_VERSION} \ - -e ${BUILDDIR}/install/AthSimulationExternals/${NICOS_PROJECT_VERSION}/InstallArea/${platform} \ + -i ${BUILDDIR}/install \ + -e ${BUILDDIR}/install/AthSimulationExternals/${version}/InstallArea/${platform} \ + -v ${version} \ -p AthSimulationExternals -f ${platform} ${EXTRACMAKE[@]/#/-x } \ ${RPMOPTIONS} -t ${BUILDTYPE} || ((ERROR_COUNT++)) diff --git a/Projects/AthSimulation/externals.txt b/Projects/AthSimulation/externals.txt index 7d611002921bf380f951488b7ccedfaf62200438..a97fd402fd3e36613ef6e9eb6af2986a8200842a 100644 --- a/Projects/AthSimulation/externals.txt +++ b/Projects/AthSimulation/externals.txt @@ -6,7 +6,7 @@ # forbidden. # The version of atlas/atlasexternals to use: -AthSimulationExternalsVersion = 2.0.55 +AthSimulationExternalsVersion = 2.0.56 # The version of atlas/Gaudi to use: GaudiVersion = v33r0.002 diff --git a/Projects/Athena/CMakeLists.txt b/Projects/Athena/CMakeLists.txt index cbe78c7c5952a9cfeda90de752ce265f1525bf62..86b9fc4b52bb692a90f7264a1cf6fce5c44ca904 100644 --- a/Projects/Athena/CMakeLists.txt +++ b/Projects/Athena/CMakeLists.txt @@ -1,20 +1,18 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -# The minimum required CMake version: +# Set up the project. cmake_minimum_required( VERSION 3.6 ) - -# Read in the project's version from a file called version.txt. But let it be -# overridden from the command line if necessary. file( READ ${CMAKE_SOURCE_DIR}/version.txt _version ) string( STRIP ${_version} _version ) -set( ATHENA_PROJECT_VERSION ${_version} - CACHE STRING "Version of the Athena project to build" ) +project( Athena VERSION ${_version} LANGUAGES C CXX Fortran ) unset( _version ) # Set the versions of the TDAQ externals to pick up for the build: if( NOT LCG_NIGHTLY ) if( NOT "$ENV{LCG_NIGHTLY}" STREQUAL "" ) - set( LCG_NIGHTLY $ENV{LCG_NIGHTLY} CACHE STRING "LCG nightly build flavor" ) - message( STATUS "Using LCG_NIGHTLY: ${LCG_NIGHTLY}" ) + set( LCG_NIGHTLY $ENV{LCG_NIGHTLY} CACHE STRING + "LCG nightly build flavor" ) + message( STATUS "Using LCG_NIGHTLY: ${LCG_NIGHTLY}" ) endif() endif() @@ -87,11 +85,9 @@ list( INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake ) # Set up CTest: atlas_ctest_setup() -# Declare project name and version -atlas_project( Athena ${ATHENA_PROJECT_VERSION} - USE AthenaExternals ${AthenaExternals_VERSION} - PROJECT_ROOT ${CMAKE_SOURCE_DIR}/../../ - LANGUAGES C CXX Fortran ) +# Set up the "ATLAS project". +atlas_project( USE AthenaExternals ${AthenaExternals_VERSION} + PROJECT_ROOT ${CMAKE_SOURCE_DIR}/../../ ) # Install the external configurations: install( DIRECTORY ${CMAKE_SOURCE_DIR}/externals @@ -106,10 +102,6 @@ if( NOT "$ENV{NICOS_PROJECT_HOME}" STREQUAL "" ) get_filename_component( _buildDir $ENV{NICOS_PROJECT_HOME} PATH ) list( APPEND _replacements ${_buildDir} "\${Athena_DIR}/../../../.." ) endif() -if( NOT "$ENV{NICOS_PROJECT_RELNAME}" STREQUAL "" ) - list( APPEND _replacements $ENV{NICOS_PROJECT_RELNAME} - "\${Athena_VERSION}" ) -endif() # Now generate and install the installed setup files: lcg_generate_env( diff --git a/Projects/Athena/build.sh b/Projects/Athena/build.sh index 30e5dd495e4ac59fe921189f26cfe328e60aa3e9..b01005cdb5a79077465317dcb5394d493b38a352 100755 --- a/Projects/Athena/build.sh +++ b/Projects/Athena/build.sh @@ -1,5 +1,7 @@ #!/bin/bash # +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# # Script for building the release on top of externals built using one of the # scripts in this directory. # @@ -89,8 +91,6 @@ if [ -z "$EXE_CMAKE" -a -z "$EXE_MAKE" -a -z "$EXE_INSTALL" -a -z "$EXE_CPACK" ] EXE_CPACK="1" fi - - # Stop on errors from here on out: set -e # consider a pipe failed if ANY of the commands fails @@ -177,7 +177,7 @@ fi # Install the results: if [ -n "$EXE_INSTALL" ]; then - { DESTDIR=${BUILDDIR}/install/Athena/${NICOS_PROJECT_VERSION} _time_ ${BUILDTOOL} ${INSTALLRULE}; } \ + { DESTDIR=${BUILDDIR}/install _time_ ${BUILDTOOL} ${INSTALLRULE}; } \ 2>&1 | tee cmake_install.log fi #^^^ do we need to analyze local install logs? diff --git a/Projects/Athena/build_env.sh b/Projects/Athena/build_env.sh index 940effa7e9dc121e6210ad1e75fbdd24aa7f7d52..936af921220452122a283c8dbd046d200c6a4902 100644 --- a/Projects/Athena/build_env.sh +++ b/Projects/Athena/build_env.sh @@ -1,3 +1,5 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# # This script sets up the build enironment for an Athena # build, on top of a built set of externals (including Gaudi) # @@ -17,15 +19,15 @@ env_setup() { # As this script can be sourced we need to support zsh and # possibly other Bourne shells if [ "x${BASH_SOURCE[0]}" = "x" ]; then - # This trick should do the right thing under ZSH: - thisdir=$(dirname `print -P %x`) - if [ $? != 0 ]; then + # This trick should do the right thing under ZSH: + thisdir=$(dirname `print -P %x`) + if [ $? != 0 ]; then echo "ERROR: This script must be sourced from BASH or ZSH" return 1 - fi + fi else - # The BASH solution is a bit more straight forward: - thisdir=$(dirname ${BASH_SOURCE[0]}) + # The BASH solution is a bit more straight forward: + thisdir=$(dirname ${BASH_SOURCE[0]}) fi AthenaSrcDir=$(cd ${thisdir};pwd) @@ -40,10 +42,10 @@ env_setup() { BUILDDIR=${AthenaSrcDir}/../../../build fi + # Get the version of Athena for the build. + version=`cat ${AthenaSrcDir}/version.txt` + # Set up the environment for the build: - export NICOS_PROJECT_VERSION=`cat ${AthenaSrcDir}/version.txt` - export NICOS_ATLAS_RELEASE=${NICOS_PROJECT_VERSION} - export NICOS_PROJECT_RELNAME=${NICOS_PROJECT_VERSION} export NICOS_PROJECT_HOME=$(cd ${BUILDDIR}/install;pwd)/Athena # Set up the environment variables for finding LCG and the TDAQ externals: @@ -51,7 +53,7 @@ env_setup() { source ${scriptsdir}/TDAQ_RELEASE_BASE.sh # Set up the AthenaExternals project: - extDir=${BUILDDIR}/install/AthenaExternals/${NICOS_PROJECT_VERSION}/InstallArea + extDir=${BUILDDIR}/install/AthenaExternals/${version}/InstallArea if [ ! -d ${extDir} ]; then echo "Didn't find the AthenaExternals project under ${extDir}" echo "(Hopefully this is intentional and you have done e.g. asetup AthenaExternals,master,latest)" @@ -63,8 +65,8 @@ env_setup() { # Point to Gaudi: # Get platform from the GAUDI build - we're assuming here that there's only one platform installed. if [ -z "${GAUDI_ROOT+1}" ]; then - platform=$(cd ${BUILDDIR}/install/GAUDI/${NICOS_PROJECT_VERSION}/InstallArea/;ls) - export GAUDI_ROOT=${BUILDDIR}/install/GAUDI/${NICOS_PROJECT_VERSION}/InstallArea/${platform} + platform=$(cd ${BUILDDIR}/install/GAUDI/${version}/InstallArea/;ls) + export GAUDI_ROOT=${BUILDDIR}/install/GAUDI/${version}/InstallArea/${platform} fi echo "Taking Gaudi from: ${GAUDI_ROOT}" diff --git a/Projects/Athena/build_externals.sh b/Projects/Athena/build_externals.sh index 38ff7afb4344ebf1e3b3e37f08c14c9d74b6b83f..f13334ceddd78de5c535f1d037aea52742e976af 100755 --- a/Projects/Athena/build_externals.sh +++ b/Projects/Athena/build_externals.sh @@ -1,5 +1,7 @@ #!/bin/bash # +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# # Script building all the externals necessary for the nightly build. # @@ -96,10 +98,8 @@ fi # Create some directories: mkdir -p ${BUILDDIR}/{src,install} -# Set some environment variables that the builds use internally: -export NICOS_PROJECT_VERSION=`cat ${thisdir}/version.txt` -export NICOS_ATLAS_RELEASE=${NICOS_PROJECT_VERSION} -export NICOS_PROJECT_RELNAME=${NICOS_PROJECT_VERSION} +# Get the version of Athena for the build. +version=`cat ${thisdir}/version.txt` # The directory holding the helper scripts: scriptsdir=${thisdir}/../../Build/AtlasBuildScripts @@ -139,13 +139,12 @@ ${scriptsdir}/checkout_atlasexternals.sh \ ## Build AthenaExternals: -export NICOS_PROJECT_HOME=$(cd ${BUILDDIR}/install;pwd)/AthenaExternals ${scriptsdir}/build_atlasexternals.sh \ -s ${BUILDDIR}/src/AthenaExternals \ -b ${BUILDDIR}/build/AthenaExternals \ - -i ${BUILDDIR}/install/AthenaExternals/${NICOS_PROJECT_VERSION} \ + -i ${BUILDDIR}/install \ -p AthenaExternals ${RPMOPTIONS} -t ${BUILDTYPE} \ - -v ${NICOS_PROJECT_VERSION} \ + -v ${version} \ ${EXTRACMAKE[@]/#/-x } || ((ERROR_COUNT++)) { @@ -159,7 +158,7 @@ ${scriptsdir}/build_atlasexternals.sh \ # Get the "platform name" from the directory created by the AthenaExternals # build: -platform=$(cd ${BUILDDIR}/install/AthenaExternals/${NICOS_PROJECT_VERSION}/InstallArea;ls) +platform=$(cd ${BUILDDIR}/install/AthenaExternals/${version}/InstallArea;ls) # Read in the tag/branch to use for Gaudi: GaudiVersion=$(awk '/^GaudiVersion/{print $3}' ${thisdir}/externals.txt) @@ -178,12 +177,12 @@ ${scriptsdir}/checkout_Gaudi.sh \ } # Build Gaudi: -export NICOS_PROJECT_HOME=$(cd ${BUILDDIR}/install;pwd)/GAUDI ${scriptsdir}/build_Gaudi.sh \ -s ${BUILDDIR}/src/GAUDI \ -b ${BUILDDIR}/build/GAUDI \ - -i ${BUILDDIR}/install/GAUDI/${NICOS_PROJECT_VERSION} \ - -e ${BUILDDIR}/install/AthenaExternals/${NICOS_PROJECT_VERSION}/InstallArea/${platform} \ + -i ${BUILDDIR}/install \ + -e ${BUILDDIR}/install/AthenaExternals/${version}/InstallArea/${platform} \ + -v ${version} \ -p AthenaExternals -f ${platform} ${RPMOPTIONS} -t ${BUILDTYPE} \ ${EXTRACMAKE[@]/#/-x } || ((ERROR_COUNT++)) diff --git a/Projects/Athena/externals.txt b/Projects/Athena/externals.txt index bcd820e5980368c91b3729caddfeced8a5ab6f59..15be8ee21ff5ed73c1aef7043e401c76d126eea0 100644 --- a/Projects/Athena/externals.txt +++ b/Projects/Athena/externals.txt @@ -6,7 +6,7 @@ # forbidden. # The version of atlas/atlasexternals to use: -AthenaExternalsVersion = 2.0.55 +AthenaExternalsVersion = 2.0.56 # The version of atlas/Gaudi to use: GaudiVersion = v33r0.002 diff --git a/Projects/VP1Light/CMakeLists.txt b/Projects/VP1Light/CMakeLists.txt index b923d66bd636ec0dd8b059d6162ae0ac27f69c8e..c600da6b936c11bb6d89cd8ef6651a6ff7c5b67c 100644 --- a/Projects/VP1Light/CMakeLists.txt +++ b/Projects/VP1Light/CMakeLists.txt @@ -1,17 +1,14 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # # This is the main CMakeLists.txt file for building the VP1Light # software release. # -# The minimum required CMake version: -cmake_minimum_required( VERSION 3.2 FATAL_ERROR ) - -# Read in the project's version from a file called version.txt. But let it be -# overridden from the command line if necessary. +# Set up the project. +cmake_minimum_required( VERSION 3.6 ) file( READ ${CMAKE_SOURCE_DIR}/version.txt _version ) string( STRIP ${_version} _version ) -set( VP1LIGHT_PROJECT_VERSION ${_version} - CACHE STRING "Version of the VP1Light project to build" ) +project( VP1Light VERSION ${_version} LANGUAGES C CXX ) unset( _version ) # This project is built on top of VP1LightExternals: @@ -22,10 +19,6 @@ find_package( VP1LightExternals REQUIRED ) # against Python to correct it. find_package( Python COMPONENTS Interpreter ) -find_package( ROOT COMPONENTS Physics Core Tree MathCore Hist RIO pthread - GenVector REQUIRED ) - - # Build options to customize the compilation of ATLAS packages option( BUILDVP1LIGHT "Build ATLAS packages for VP1 Light" ON ) @@ -40,40 +33,17 @@ install( DIRECTORY ${CMAKE_SOURCE_DIR}/modules/ PATTERN ".svn" EXCLUDE PATTERN "*~" EXCLUDE ) -# Include the VP1Light specific function(s), to include RootCore: -include( VP1LightFunctions ) # TODO: Do we need RootCore for VP1Light/xAOD??? - # Set up the build/runtime environment: set( VP1LightReleaseEnvironment_DIR ${CMAKE_SOURCE_DIR} ) find_package( VP1LightReleaseEnvironment REQUIRED ) -# Add the directory to the global include path, where the project -# will create the RootCore/Packages.h header: -include_directories( ${CMAKE_BINARY_DIR}/RootCore/include ) - # Set up CTest: atlas_ctest_setup() -# Custom definitions needed for this package -# set( CMAKE_CXX_STANDARD 14 ) # this must be declared BEFORE the 'atlas_project' command - - -message("Using VP1LightExternals version: $ENV{VP1LightExternals_VERSION}" ) - # Declare project name and version -atlas_project( VP1Light ${VP1LIGHT_PROJECT_VERSION} - #USE VP1LightExternals $ENV{VP1LightExternals_VERSION} # This fails on macOS +atlas_project( USE VP1LightExternals ${VP1LightExternals_VERSION} PROJECT_ROOT ${CMAKE_SOURCE_DIR}/../../ ) -# Generate the RootCore/Packages.h header: -vp1light_generate_release_header() - -# Set up the load_packages.C script: -configure_file( ${CMAKE_SOURCE_DIR}/scripts/load_packages.C.in - ${CMAKE_SCRIPT_OUTPUT_DIRECTORY}/load_packages.C @ONLY ) -install( FILES ${CMAKE_SCRIPT_OUTPUT_DIRECTORY}/load_packages.C - DESTINATION ${CMAKE_INSTALL_SCRIPTDIR} ) - # Configure and install the post-configuration file: configure_file( ${CMAKE_SOURCE_DIR}/PostConfig.cmake.in ${CMAKE_BINARY_DIR}/PostConfig.cmake @ONLY ) @@ -86,10 +56,6 @@ if( NOT "$ENV{NICOS_PROJECT_HOME}" STREQUAL "" ) get_filename_component( _buildDir $ENV{NICOS_PROJECT_HOME} PATH ) list( APPEND _replacements ${_buildDir} "\${VP1Light_DIR}/../../../.." ) endif() -if( NOT "$ENV{NICOS_PROJECT_RELNAME}" STREQUAL "" ) - list( APPEND _replacements $ENV{NICOS_PROJECT_RELNAME} - "\${VP1Light_VERSION}" ) -endif() # Generate the environment configuration file(s): lcg_generate_env( diff --git a/Projects/VP1Light/build.sh b/Projects/VP1Light/build.sh index c4c4e9e761659013233539e275b68bf26c6e0e61..fc9c0bd34408ece9ba1701288eed4e9b631764c3 100755 --- a/Projects/VP1Light/build.sh +++ b/Projects/VP1Light/build.sh @@ -1,5 +1,7 @@ #!/bin/bash # +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# # Script for building the release on top of externals built using the # script in this directory. # @@ -153,7 +155,7 @@ fi # Install the results: if [ -n "$EXE_INSTALL" ]; then time make install/fast \ - DESTDIR=${BUILDDIR}/install/VP1Light/${NICOS_PROJECT_VERSION} \ + DESTDIR=${BUILDDIR}/install \ 2>&1 | tee cmake_install.log fi diff --git a/Projects/VP1Light/build_env.sh b/Projects/VP1Light/build_env.sh index f4f14797e3f9417bdb44f4c676c8227288e2ae16..ea25cdbe47a2ff843c14cda05ab3c7e07125e200 100644 --- a/Projects/VP1Light/build_env.sh +++ b/Projects/VP1Light/build_env.sh @@ -1,3 +1,5 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# # This script sets up the build enironment for an VP1Light # build, on top of a built set of externals. # @@ -37,14 +39,14 @@ env_setup() { BUILDDIR=${VP1LightSrcDir}/../../../build fi + # Get the version of VP1Light for the build. + version=`cat ${VP1LightSrcDir}/version.txt` + # Set up the environment for the build: - export NICOS_PROJECT_VERSION=`cat ${VP1LightSrcDir}/version.txt` - export NICOS_ATLAS_RELEASE=${NICOS_PROJECT_VERSION} - export NICOS_PROJECT_RELNAME=${NICOS_PROJECT_VERSION} export NICOS_PROJECT_HOME=$(cd ${BUILDDIR}/install;pwd)/VP1Light # Set up the VP1LightExternals project: - extDir=${BUILDDIR}/install/VP1LightExternals/${NICOS_PROJECT_VERSION}/InstallArea + extDir=${BUILDDIR}/install/VP1LightExternals/${version}/InstallArea if [ ! -d ${extDir} ]; then echo "Didn't find the VP1LightExternals project under ${extDir}" fi diff --git a/Projects/VP1Light/build_externals.sh b/Projects/VP1Light/build_externals.sh index 9254fc31a845278d809edadfe42a24eb8db203c9..4b83f43b313b6841ff8599a7418ea5a6a561824e 100755 --- a/Projects/VP1Light/build_externals.sh +++ b/Projects/VP1Light/build_externals.sh @@ -1,5 +1,7 @@ #!/bin/bash # +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# # Script building all the externals necessary for the nightly build. # @@ -83,10 +85,8 @@ fi # Create some directories: mkdir -p ${BUILDDIR}/install -# Set some environment variables that the builds use internally: -export NICOS_PROJECT_VERSION=`cat ${thisdir}/version.txt` -export NICOS_ATLAS_RELEASE=${NICOS_PROJECT_VERSION} -export NICOS_PROJECT_RELNAME=${NICOS_PROJECT_VERSION} +# Get the version of VP1Light for the build. +version=`cat ${thisdir}/version.txt` # The directory holding the helper scripts: scriptsdir=${thisdir}/../../Build/AtlasBuildScripts @@ -111,7 +111,7 @@ export NICOS_PROJECT_HOME=$(cd ${BUILDDIR}/install;pwd)/VP1LightExternals ${scriptsdir}/build_atlasexternals.sh \ -s ${BUILDDIR}/src/VP1LightExternals \ -b ${BUILDDIR}/build/VP1LightExternals \ - -i ${BUILDDIR}/install/VP1LightExternals/${NICOS_PROJECT_VERSION} \ + -i ${BUILDDIR}/install \ -p VP1LightExternals ${RPMOPTIONS} -t ${BUILDTYPE} \ - -v ${NICOS_PROJECT_VERSION} \ + -v ${version} \ ${EXTRACMAKE[@]/#/-x } diff --git a/Projects/VP1Light/externals.txt b/Projects/VP1Light/externals.txt index d9c5d59df8e7f1f4f981c872f5520a0de99aea92..8c3230444437adcbbe4bc892d96d78d25a5280fe 100644 --- a/Projects/VP1Light/externals.txt +++ b/Projects/VP1Light/externals.txt @@ -6,4 +6,4 @@ # forbidden. # The version of atlas/atlasexternals to use: -VP1LightExternalsVersion = 2.0.55 +VP1LightExternalsVersion = 2.0.56