Skip to content
Snippets Groups Projects
Commit 48cdc3b0 authored by Will Buttinger's avatar Will Buttinger
Browse files

Many improvements to build process

parent f6b8a292
No related branches found
No related tags found
1 merge request!4Many improvements to build process
Showing
with 889 additions and 22 deletions
......@@ -21,7 +21,8 @@ variables:
# image.
before_script:
- source /opt/lcg/gcc/8.3.0/x86_64-centos7/setup.sh
- export MAKEFLAGS="-j`nproc` -l`nproc`"
- export MAKEFLAGS="-j`nproc`"
- echo $MAKEFLAGS
- export PATH="/opt/cmake/3.21.3/Linux-x86_64/bin/:$PATH"
# Configuration for the CMake build job.
......@@ -34,7 +35,7 @@ build:
script:
- sudo yum install binutils \
libX11-devel libXpm-devel libXft-devel libXext-devel python openssl-devel \
mesa-libGL-devel mesa-libGLU-devel glew-devel ftgl-devel -y
mesa-libGL-devel mesa-libGLU-devel glew-devel ftgl-devel sqlite-devel -y
- mkdir -p ci_build
- cmake -DCMAKE_BUILD_TYPE=Release -DCI_JOB_TOKEN=${CI_JOB_TOKEN} -S . -B ci_build/
- cd ci_build/
......
......@@ -31,6 +31,13 @@ add_subdirectory(ProjectOptions)
# Set up CTest.
atlas_ctest_setup()
# Set CI token if it exists, otherwise use no token - used for checkouts of external projects
if(CI_JOB_TOKEN)
set( _token "gitlab-ci-token:${CI_JOB_TOKEN}@" )
else()
set( _token "" )
endif()
# Set up the project with all of its packages.
atlas_project()
......@@ -50,5 +57,8 @@ install( FILES ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/env_setup_install.sh
install( FILES cmake/SetupPython.cmake cmake/SetupROOT.cmake
DESTINATION ${CMAKE_INSTALL_CMAKEDIR}/modules )
# Package up the release using CPack.
atlas_cpack_setup()
if("${CMAKE_INSTALL_PREFIX}" STREQUAL
"/${CMAKE_PROJECT_NAME}/${CMAKE_PROJECT_VERSION}/InstallArea/${ATLAS_PLATFORM}")
# Package up the release using CPack.
atlas_cpack_setup()
endif()
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
#
# Package building BootstrapGenerator for StatAnalysis releases
#
# The name of the package:
atlas_subdir( BootstrapGenerator )
set( STATANA_BOOTSTRAPGENERATOR_REPOSITORY "https://${_token}gitlab.cern.ch/atlas-physics/sm/StandardModelTools_BootstrapGenerator/BootstrapGenerator.git" CACHE STRING "Repository of BootstrapGenerator" )
set( _buildDir ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/BootstrapGeneratorBuild )
if(STATANA_VERBOSE)
set(_logging OFF)
else()
set(_logging ON)
endif()
# Build lwtnn for the build area:
ExternalProject_Add( BootstrapGenerator
PREFIX ${CMAKE_BINARY_DIR}
INSTALL_DIR ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}
GIT_REPOSITORY ${STATANA_BOOTSTRAPGENERATOR_REPOSITORY}
GIT_TAG ${STATANA_BOOTSTRAPGENERATOR_VERSION}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${_buildDir}
-DCMAKE_PREFIX_PATH:PATH=${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM} # ensures will discover the release's version of ROOT
LOG_DOWNLOAD ${_logging} LOG_CONFIGURE ${_logging} LOG_BUILD ${_logging} LOG_INSTALL ${_logging}
UPDATE_COMMAND "" # needed for next line to work
UPDATE_DISCONNECTED TRUE) # skips reconfigure+build if just rerunning.
ExternalProject_Add_Step( BootstrapGenerator buildinstall
COMMAND ${CMAKE_COMMAND} -E copy_directory ${_buildDir} <INSTALL_DIR>
COMMENT "Installing BootstrapGenerator into the build area"
DEPENDEES install
)
add_dependencies( Package_BootstrapGenerator BootstrapGenerator )
if( ATLAS_BUILD_ROOT )
add_dependencies ( BootstrapGenerator ROOT )
endif()
# Install BootstrapGenerator:
install( DIRECTORY ${_buildDir}/
DESTINATION . USE_SOURCE_PERMISSIONS OPTIONAL )
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
#
# Package building CommonStatTools for StatAnalysis releases
#
# The name of the package:
atlas_subdir( CommonStatTools )
set( STATANA_COMMONSTATTOOLS_REPOSITORY "https://${_token}gitlab.cern.ch/atlas-phys/exot/CommonStatTools.git" CACHE STRING "Repository of CommonStatTools" )
if(STATANA_VERBOSE)
set(_logging OFF)
else()
set(_logging ON)
endif()
set( _buildDir ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CommonStatToolsBuild )
# Build lwtnn for the build area:
ExternalProject_Add( CommonStatTools
PREFIX ${CMAKE_BINARY_DIR}
INSTALL_DIR ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}
GIT_REPOSITORY ${STATANA_COMMONSTATTOOLS_REPOSITORY}
GIT_TAG ${STATANA_COMMONSTATTOOLS_VERSION}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${_buildDir}
-DCMAKE_PREFIX_PATH:PATH=${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM} # ensures will discover the release's version of ROOT
LOG_DOWNLOAD ${_logging} LOG_CONFIGURE ${_logging} LOG_BUILD ${_logging} LOG_INSTALL ${_logging}
UPDATE_COMMAND "" # needed for next line to work
UPDATE_DISCONNECTED TRUE) # skips reconfigure+build if just rerunning.
ExternalProject_Add_Step( CommonStatTools buildinstall
COMMAND ${CMAKE_COMMAND} -E copy_directory ${_buildDir} <INSTALL_DIR>
COMMENT "Installing CommonStatTools into the build area"
DEPENDEES install
)
if( ATLAS_BUILD_ROOT )
add_dependencies ( CommonStatTools ROOT )
endif()
# Install CommonStatTools:
install( DIRECTORY ${_buildDir}/
DESTINATION . USE_SOURCE_PERMISSIONS OPTIONAL )
install( FILES cmake/FindCommonStatTools.cmake
DESTINATION ${CMAKE_INSTALL_CMAKEDIR}/modules OPTIONAL )
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
#
# Locate the CommonStatTools external package.
#
# Defines:
# COMMONSTATTOOLS_FOUND
# COMMONSTATTOOLS_INCLUDE_DIR
# COMMONSTATTOOLS_INCLUDE_DIRS
# COMMONSTATTOOLS_LIBRARIES
# COMMONSTATTOOLS_LIBRARY_DIRS
#
# The user can set COMMONSTATTOOLS_ATROOT to guide the script.
#
# Include the helper code:
include( AtlasInternals )
# Declare the module:
atlas_external_module( NAME CommonStatTools
INCLUDE_SUFFIXES include INCLUDE_NAMES CommonStatTools
LIBRARY_SUFFIXES lib
COMPULSORY_COMPONENTS CommonStatTools )
# Handle the standard find_package arguments:
include( FindPackageHandleStandardArgs )
find_package_handle_standard_args( CommonStatTools DEFAULT_MSG COMMONSTATTOOLS_INCLUDE_DIRS
COMMONSTATTOOLS_LIBRARIES )
mark_as_advanced( COMMONSTATTOOLS_FOUND COMMONSTATTOOLS_INCLUDE_DIR COMMONSTATTOOLS_INCLUDE_DIRS
COMMONSTATTOOLS_LIBRARIES COMMONSTATTOOLS_LIBRARY_DIRS )
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
#
# Package building HistFitter for StatAnalysis releases
#
message(STATUS "HistFitter currently not possible to included - requires CMake configuration")
return()
# The name of the package:
atlas_subdir( HistFitter )
set( STATANA_HISTFITTER_REPOSITORY "https://github.com/histfitter/histfitter.git" CACHE STRING "Repository of HistFitter" )
set( _buildDir ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/HistFitterBuild )
if(STATANA_VERBOSE)
set(_logging OFF)
else()
set(_logging ON)
endif()
# Build lwtnn for the build area:
ExternalProject_Add( HistFitter
PREFIX ${CMAKE_BINARY_DIR}
INSTALL_DIR ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}
GIT_REPOSITORY ${STATANA_HISTFITTER_REPOSITORY}
GIT_TAG ${STATANA_HISTFITTER_VERSION}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${_buildDir}
-DCMAKE_PREFIX_PATH:PATH=${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM} # ensures will discover the release's version of ROOT
LOG_DOWNLOAD ${_logging} LOG_CONFIGURE ${_logging} LOG_BUILD ${_logging} LOG_INSTALL ${_logging}
UPDATE_COMMAND "" # needed for next line to work
UPDATE_DISCONNECTED TRUE) # skips reconfigure+build if just rerunning.
ExternalProject_Add_Step( HistFitter buildinstall
COMMAND ${CMAKE_COMMAND} -E copy_directory ${_buildDir} <INSTALL_DIR>
COMMENT "Installing HistFitter into the build area"
DEPENDEES install
)
add_dependencies( Package_HistFitter HistFitter )
if( ATLAS_BUILD_ROOT )
add_dependencies ( HistFitter ROOT )
endif()
# Install HistFitter:
install( DIRECTORY ${_buildDir}/
DESTINATION . USE_SOURCE_PERMISSIONS OPTIONAL )
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
#
# Configuration for building LibXml2 as part of the offline / analysis release.
#
# Stop if the build is not needed:
if( NOT ATLAS_BUILD_LIBXML2 )
return()
endif()
# Set the name of the package:
atlas_subdir( LibXml2 )
# Tell the user what's happening:
message( STATUS "BUILDING: LibXml2 as part of this project" )
# The source code of LibXml2:
set( _source
"http://cern.ch/lcgpackages/tarFiles/sources/libxml2-2.9.10.tar.gz" )
set( _md5 "10942a1dc23137a8aa07f0639cbfece5" )
# Temporary directory for the build results:
set( _buildDir
${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/LibXml2Build )
# Create the sanitization script:
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/sanitizeConfig.sh.in
${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/sanitizeConfig.sh @ONLY )
# Files/directories generated by the build.
set( LIBXML2_INCLUDE_DIR "${_buildDir}/include/libxml2" )
file( MAKE_DIRECTORY "${LIBXML2_INCLUDE_DIR}" )
set( LIBXML2_LIBRARY
"${_buildDir}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}xml2${CMAKE_SHARED_LIBRARY_SUFFIX}" )
# Build LibXml2:
ExternalProject_Add( LibXml2
PREFIX ${CMAKE_BINARY_DIR}
INSTALL_DIR ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}
LOG_DOWNLOAD ON LOG_CONFIGURE ON LOG_BUILD ON LOG_INSTALL ON
URL ${_source}
URL_MD5 ${_md5}
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${_buildDir}
--without-python --without-lzma --enable-shared --disable-static
INSTALL_COMMAND make install
COMMAND ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/sanitizeConfig.sh
${_buildDir}/bin/xml2-config ${_buildDir}/lib/pkgconfig/libxml-2.0.pc
${_buildDir}/lib/libxml2.la ${_buildDir}/lib/xml2Conf.sh
COMMAND ${CMAKE_COMMAND} -E copy_directory ${_buildDir}/ <INSTALL_DIR>
BUILD_BYPRODUCTS "${LIBXML2_LIBRARY}" )
ExternalProject_Add_Step( LibXml2 purgeBuild
COMMAND ${CMAKE_COMMAND} -E remove_directory "<BINARY_DIR>"
COMMAND ${CMAKE_COMMAND} -E make_directory "<BINARY_DIR>"
COMMAND ${CMAKE_COMMAND} -E remove_directory "${_buildDir}"
COMMENT "Removing previous build results for LibXml2"
DEPENDEES download
DEPENDERS patch )
add_dependencies( Package_LibXml2 LibXml2 )
# Set up imported targets that could be used by other packages in their builds.
add_library( LibXml2::LibXml2 SHARED IMPORTED GLOBAL )
set_target_properties( LibXml2::LibXml2 PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${LIBXML2_INCLUDE_DIR}"
IMPORTED_LOCATION "${LIBXML2_LIBRARY}" )
# Set up its installation:
install( DIRECTORY ${_buildDir}/
DESTINATION . USE_SOURCE_PERMISSIONS OPTIONAL )
LibXml2
=======
This package builds the [libxml2](http://xmlsoft.org)
libraries/executables, to be used in standalone/analysis releases.
#!/bin/bash
#
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
#
# Script used to make the files produced by the LibXml2 build relocatable.
#
# Fail on errors:
set -e
# Loop over all files given to this script, and patch them all in the same way:
for script in $*; do
# Create a sanitized version of the script by replacing the "build
# directory" with the environment variable that will be available when the
# installed project is set up.
sed -i.bak -e "s:@_buildDir@:\${@CMAKE_PROJECT_NAME@_DIR}:g" ${script}
# Remove the old version:
rm ${script}.bak
done
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
#
# Configuration for building/installing python "analysis" modules.
#
# The name of the package:
atlas_subdir( PyAnalysis )
# Figure out whether we need to do anything.
if( NOT ATLAS_BUILD_PYANALYSIS )
return()
endif()
# Tell the user what's happening:
message( STATUS "BUILDING: setuptools, Cython, numpy, pip, wheel (core extensions of Python)" )
# Figure out where to take Python from:
if( ATLAS_BUILD_PYTHON )
set( Python_EXECUTABLE $<TARGET_FILE:Python::Interpreter> )
set( Python_VERSION_MAJOR 3 )
set( Python_VERSION_MINOR 8 )
if(NOT TARGET libffi::ffi)
find_package( libffi QUIET )
endif()
else()
find_package( Python COMPONENTS Interpreter REQUIRED )
find_package( libffi REQUIRED )
endif()
if (NOT STATANA_VERBOSE)
set(_logging "LOG_DOWNLOAD ON LOG_CONFIGURE ON LOG_BUILD ON LOG_INSTALL ON")
endif()
# Install the find module(s):
install( FILES cmake/FindNumPy.cmake
DESTINATION ${CMAKE_INSTALL_CMAKEDIR}/modules )
# Setup the build/runtime environment for the python analysis packages:
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/cmake/PyAnalysisEnvironmentConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/PyAnalysisEnvironmentConfig.cmake
@ONLY )
set( PyAnalysisEnvironment_DIR
${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}
CACHE PATH "Location of PyAnalysisEnvironmentConfig.cmake" )
find_package( PyAnalysisEnvironment REQUIRED )
# A common installation directory for all python externals of the package:
set( _buildDir
${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/PyAnalysisBuild )
set( _sitePkgsDir ${_buildDir}/lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages )
# Build/install setuptools:
set( _source
"http://cern.ch/lcgpackages/tarFiles/sources/setuptools-44.1.0.zip" )
set( _md5 "f17522189e7c0262b67e590d529d4e06" )
ExternalProject_Add( setuptools
PREFIX ${CMAKE_BINARY_DIR}
INSTALL_DIR ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}
URL ${_source}
URL_MD5 ${_md5}
BUILD_IN_SOURCE 1
LOG_DOWNLOAD ON LOG_CONFIGURE ON LOG_BUILD ON LOG_INSTALL ON
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${_sitePkgsDir}
COMMAND ${CMAKE_COMMAND} -E env
LD_LIBRARY_PATH=$<TARGET_FILE_DIR:libffi::ffi>
DYLD_LIBRARY_PATH=$<TARGET_FILE_DIR:libffi::ffi>
${Python_EXECUTABLE} <SOURCE_DIR>/bootstrap.py
BUILD_COMMAND ${CMAKE_COMMAND} -E env
LD_LIBRARY_PATH=$<TARGET_FILE_DIR:libffi::ffi>
DYLD_LIBRARY_PATH=$<TARGET_FILE_DIR:libffi::ffi>
${Python_EXECUTABLE} <SOURCE_DIR>/setup.py build
INSTALL_COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${_sitePkgsDir}
LD_LIBRARY_PATH=$<TARGET_FILE_DIR:libffi::ffi>
DYLD_LIBRARY_PATH=$<TARGET_FILE_DIR:libffi::ffi>
${Python_EXECUTABLE} <SOURCE_DIR>/setup.py install --prefix=${_buildDir}
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../atlasexternals/External/scripts/sanitizePythonScripts.sh
"${_buildDir}/bin/easy_install*"
COMMAND ${CMAKE_COMMAND} -E copy_directory ${_buildDir}/ <INSTALL_DIR> )
add_dependencies( Package_PyAnalysis setuptools )
if( ATLAS_BUILD_PYTHON )
add_dependencies( setuptools Python )
endif()
if( NOT NUMPY_FOUND OR ATLAS_BUILD_PYTHON )
# Build/install Cython.
set( _source
"https://cern.ch/lcgpackages/tarFiles/sources/Cython-0.29.21.tar.gz" )
set( _md5 "12c5e45af71dcc6dff28cdcbcbef6f39" )
ExternalProject_Add( Cython
PREFIX ${CMAKE_BINARY_DIR}
INSTALL_DIR ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}
URL ${_source}
URL_MD5 ${_md5}
BUILD_IN_SOURCE 1
LOG_DOWNLOAD ON LOG_CONFIGURE ON LOG_BUILD ON LOG_INSTALL ON
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${_sitePkgsDir}
BUILD_COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${_sitePkgsDir}
LD_LIBRARY_PATH=$<TARGET_FILE_DIR:libffi::ffi>
DYLD_LIBRARY_PATH=$<TARGET_FILE_DIR:libffi::ffi>
${Python_EXECUTABLE} <SOURCE_DIR>/setup.py build
INSTALL_COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${_sitePkgsDir}
LD_LIBRARY_PATH=$<TARGET_FILE_DIR:libffi::ffi>
DYLD_LIBRARY_PATH=$<TARGET_FILE_DIR:libffi::ffi>
${Python_EXECUTABLE} <SOURCE_DIR>/setup.py install --prefix=${_buildDir}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${_buildDir}/ <INSTALL_DIR> )
add_dependencies( Package_PyAnalysis Cython )
add_dependencies( Cython setuptools )
# Build/install numpy:
set( _source
"http://cern.ch/lcgpackages/tarFiles/sources/numpy-1.18.2.tar.gz" )
set( _md5 "52601ac4cfbd513218bc088b74715098" )
ExternalProject_Add( numpy
PREFIX ${CMAKE_BINARY_DIR}
INSTALL_DIR ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}
URL ${_source}
URL_MD5 ${_md5}
BUILD_IN_SOURCE 1
LOG_DOWNLOAD ON LOG_CONFIGURE ON LOG_BUILD ON LOG_INSTALL ON
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${_sitePkgsDir}
BUILD_COMMAND ${CMAKE_COMMAND} -E env --unset=SHELL
PYTHONPATH=${_sitePkgsDir}
LD_LIBRARY_PATH=$<TARGET_FILE_DIR:libffi::ffi>
DYLD_LIBRARY_PATH=$<TARGET_FILE_DIR:libffi::ffi>
${Python_EXECUTABLE} <SOURCE_DIR>/setup.py build
INSTALL_COMMAND ${CMAKE_COMMAND} -E env --unset=SHELL
PYTHONPATH=${_sitePkgsDir}
LD_LIBRARY_PATH=$<TARGET_FILE_DIR:libffi::ffi>
DYLD_LIBRARY_PATH=$<TARGET_FILE_DIR:libffi::ffi>
${Python_EXECUTABLE} <SOURCE_DIR>/setup.py install --prefix=${_buildDir}
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../atlasexternals/External/scripts/sanitizePythonScripts.sh
"${_buildDir}/bin/f2py*"
COMMAND ${CMAKE_COMMAND} -E copy_directory ${_buildDir}/ <INSTALL_DIR> )
add_dependencies( Package_PyAnalysis numpy )
add_dependencies( numpy setuptools Cython )
endif()
if( NOT PIP_FOUND OR ATLAS_BUILD_PYTHON )
# Build/install wheel:
set( _source
"http://cern.ch/lcgpackages/tarFiles/sources/wheel-0.33.4.tar.gz" )
set( _md5 "698ac73e028f3a9084dd6c68b2713faa" )
ExternalProject_Add( wheel
PREFIX ${CMAKE_BINARY_DIR}
INSTALL_DIR ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}
URL ${_source}
URL_MD5 ${_md5}
BUILD_IN_SOURCE 1
LOG_DOWNLOAD ON LOG_CONFIGURE ON LOG_BUILD ON LOG_INSTALL ON
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${_sitePkgsDir}
BUILD_COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${_sitePkgsDir}
LD_LIBRARY_PATH=$<TARGET_FILE_DIR:libffi::ffi>
DYLD_LIBRARY_PATH=$<TARGET_FILE_DIR:libffi::ffi>
${Python_EXECUTABLE} <SOURCE_DIR>/setup.py build
INSTALL_COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${_sitePkgsDir}
LD_LIBRARY_PATH=$<TARGET_FILE_DIR:libffi::ffi>
DYLD_LIBRARY_PATH=$<TARGET_FILE_DIR:libffi::ffi>
${Python_EXECUTABLE} <SOURCE_DIR>/setup.py install --prefix=${_buildDir}
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../atlasexternals/External/scripts/sanitizePythonScripts.sh
"${_buildDir}/bin/wheel*"
COMMAND ${CMAKE_COMMAND} -E copy_directory ${_buildDir}/ <INSTALL_DIR> )
add_dependencies( Package_PyAnalysis wheel )
add_dependencies( wheel setuptools )
if( ATLAS_BUILD_PYTHON )
add_dependencies( wheel Python )
endif()
# This makes sure that package compilation would happen one-by-one. Otherwise
# some race conditions can arise when installing packages into the same area
# at once.
if( NOT NUMPY_FOUND OR ATLAS_BUILD_PYTHON )
add_dependencies( wheel numpy )
endif()
# Build/install pip:
set( _source
"http://cern.ch/lcgpackages/tarFiles/sources/pip-21.0.1.tar.gz" )
set( _md5 "246523bd34dd356e7506adf54d206b12" )
ExternalProject_Add( pip
PREFIX ${CMAKE_BINARY_DIR}
INSTALL_DIR ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}
URL ${_source}
URL_MD5 ${_md5}
BUILD_IN_SOURCE 1
LOG_DOWNLOAD ON LOG_CONFIGURE ON LOG_BUILD ON LOG_INSTALL ON
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${_sitePkgsDir}
BUILD_COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${_sitePkgsDir}
LD_LIBRARY_PATH=$<TARGET_FILE_DIR:libffi::ffi>
DYLD_LIBRARY_PATH=$<TARGET_FILE_DIR:libffi::ffi>
${Python_EXECUTABLE} <SOURCE_DIR>/setup.py build
INSTALL_COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${_sitePkgsDir}
LD_LIBRARY_PATH=$<TARGET_FILE_DIR:libffi::ffi>
DYLD_LIBRARY_PATH=$<TARGET_FILE_DIR:libffi::ffi>
${Python_EXECUTABLE} <SOURCE_DIR>/setup.py install --prefix=${_buildDir}
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../atlasexternals/External/scripts/sanitizePythonScripts.sh
"${_buildDir}/bin/pip*"
COMMAND ${CMAKE_COMMAND} -E copy_directory ${_buildDir}/ <INSTALL_DIR> )
add_dependencies( Package_PyAnalysis pip )
add_dependencies( pip setuptools wheel )
if( ATLAS_BUILD_PYTHON )
add_dependencies( pip Python )
endif()
endif()
# Set up a dummy imported target that other packages could use to find these
# python modules in their own builds.
add_library( PyAnalysis::PyAnalysis UNKNOWN IMPORTED GLOBAL )
set_target_properties( PyAnalysis::PyAnalysis PROPERTIES
INSTALL_PATH "${_buildDir}"
BINARY_PATH "${_buildDir}/bin"
PYTHON_PATH "${_sitePkgsDir}" )
# Install all built modules at the same time:
install( DIRECTORY ${_buildDir}/
DESTINATION . USE_SOURCE_PERMISSIONS OPTIONAL )
# Test that, whatever the setup, we are able to use pip to install (as an
# example) the cookiecutter project.
set( _pipInstallDir
${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/cookiecutterTest )
atlas_add_test( pip_install
SCRIPT pip install --target=${_pipInstallDir} cookiecutter )
Python Analysis Modules
=======================
This package collects some Python modules useful for analysis.
The name "PyAnalysis" sort of mimicks the "pyanalysis" package name from LCG.
Currently the package basically just provides NumPy for the standalone
analysis release. The package is only meant to be used in AnalysisBase, at
least for now. Since LCG provides an even larger set of analysis modules,
so all projects building on top of LCG should just be using the modules from
there.
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
#
# Module looking up NumPy.
#
# Sets:
# - NUMPY_FOUND
# - NUMPY_INCLUDE_DIRS
#
# We need python if we are to find NumPy:
if( NumPy_FIND_QUIETLY )
find_package( Python COMPONENTS Interpreter QUIET )
else()
find_package( Python COMPONENTS Interpreter )
endif()
# If Python is found, try to find NumPy with it:
if( Python_Interpreter_FOUND )
# Find out the include path:
execute_process(
COMMAND "${Python_EXECUTABLE}" -c
"try: import numpy; print( numpy.get_include() )\nexcept:pass\n"
OUTPUT_VARIABLE _numpy_path
OUTPUT_STRIP_TRAILING_WHITESPACE )
# And the version:
execute_process(
COMMAND "${Python_EXECUTABLE}" -c
"try: import numpy; print( numpy.__version__ )\nexcept:pass\n"
OUTPUT_VARIABLE _numpy_version
OUTPUT_STRIP_TRAILING_WHITESPACE )
# Look for a characteristic numpy header:
find_path( NUMPY_INCLUDE_DIR numpy/arrayobject.h
PATHS ${_numpy_path} )
set( NUMPY_INCLUDE_DIRS ${NUMPY_INCLUDE_DIR} )
endif()
# Handle the standard find_package arguments:
include( FindPackageHandleStandardArgs )
find_package_handle_standard_args( NumPy
FOUND_VAR NUMPY_FOUND
REQUIRED_VARS NUMPY_INCLUDE_DIR
VERSION_VAR _numpy_version )
# Clean up:
unset( _numpy_path )
unset( _numpy_version )
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
#
# Environment setup file for the python analysis packages.
#
# Set up the environment setup variable:
set( PYANALYSISENVIRONMENT_ENVIRONMENT
PREPEND PYTHONPATH
\${@CMAKE_PROJECT_NAME@_DIR}/@CMAKE_INSTALL_LIBDIR@/python@Python_VERSION_MAJOR@.@Python_VERSION_MINOR@/site-packages )
# Declare the module found:
set( PYANALYSISENVIRONMENT_FOUND TRUE )
......@@ -16,6 +16,7 @@ endif()
# A common (temporary) installation directory for all python packages.
set( _buildDir
"${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/PyExternalsBuild" )
file(MAKE_DIRECTORY ${_buildDir})
# Stamp file signalling that the python module build was successful.
set( _pipStamp
......@@ -58,4 +59,4 @@ install( DIRECTORY "${_buildDir}/"
# Clean up.
unset( _buildDir )
unset( _pipStamp )
unset( _requireements )
unset( _requirements )
......@@ -4,3 +4,4 @@
#
pyhf==0.5.2
ipython==8.2.0
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
#
# Configuration for building Python 3 if it's not available on the
# build machine.
#
# Stop if the build is not needed:
if( NOT ATLAS_BUILD_PYTHON )
return()
endif()
# The name of the package:
atlas_subdir( Python )
find_package( libffi QUIET)
if(NOT LIBFFI_FOUND)
# The source code for libffi.
set( _source
"https://cern.ch/lcgpackages/tarFiles/sources/libffi-3.2.1.tar.gz" )
set( _md5 "83b89587607e3eb65c70d361f13bab43" )
# Temporary directory for the libffi build results.
set( _buildDir ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/LibffiBuild )
# Files/directories generated by the build.
set( LIBFFI_INCLUDE_DIR "${_buildDir}/lib/libffi-3.2.1/include" )
file( MAKE_DIRECTORY "${LIBFFI_INCLUDE_DIR}" )
set( LIBFFI_LIBRARY
"${_buildDir}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}ffi${CMAKE_SHARED_LIBRARY_SUFFIX}" )
message(STATUS "BUILDING: libffi (because required for Python build)")
# Set up the build of libffi.
ExternalProject_Add( libffi
PREFIX ${CMAKE_BINARY_DIR}
LOG_DOWNLOAD ON LOG_CONFIGURE ON LOG_BUILD ON LOG_INSTALL ON
INSTALL_DIR ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}
URL ${_source}
URL_MD5 ${_md5}
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${_buildDir}
INSTALL_COMMAND make install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${_buildDir}/ <INSTALL_DIR>
BUILD_BYPRODUCTS "${LIBFFI_LIBRARY}" )
ExternalProject_Add_Step( libffi forcedownload
COMMAND ${CMAKE_COMMAND} -E echo "Forcing the re-download of libffi."
DEPENDERS download )
ExternalProject_Add_Step( libffi purgeBuild
COMMAND ${CMAKE_COMMAND} -E remove_directory "<BINARY_DIR>"
COMMAND ${CMAKE_COMMAND} -E make_directory "<BINARY_DIR>"
COMMAND ${CMAKE_COMMAND} -E remove_directory "${_buildDir}"
COMMENT "Removing previous build results for libffi"
DEPENDEES download
DEPENDERS patch )
add_dependencies( Package_Python libffi )
# Set up imported targets that could be used by other packages in their builds.
if( NOT TARGET "libffi::ffi" )
add_library( libffi::ffi SHARED IMPORTED GLOBAL )
set_target_properties( libffi::ffi PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${LIBFFI_INCLUDE_DIR}"
IMPORTED_LOCATION "${LIBFFI_LIBRARY}" )
endif()
# Install libffi:
install( DIRECTORY ${_buildDir}/
DESTINATION . USE_SOURCE_PERMISSIONS OPTIONAL )
else()
#add_library( libffi::ffi SHARED IMPORTED GLOBAL )
message(STATUS "Found libffi: ${LIBFFI_LIBRARY}")
set_target_properties( libffi::ffi PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${LIBFFI_INCLUDE_DIR}"
IMPORTED_LOCATION "${LIBFFI_LIBRARY}" )
endif()
# Extra configuration parameters for the build.
set( _extraArgs )
# Set up its dependence on OpenSSL.
find_package( OpenSSL QUIET )
if( OPENSSL_FOUND )
# Pass the found library to the XRootD build.
list( APPEND _extraArgs --with-openssl=${OPENSSL_INCLUDE_DIR}/../ )
else()
# Build the OpenSSL library ourselves, and point the XRootD build at it.
message(STATUS "BUILDING: OpenSSL 1.1.1 (required for pip in Python)")
set( _opensslBuildDir
"${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/OpenSSLBuild" )
# todo: make rpath work with the openSSL build - so that paths to build area don't end up in libs
ExternalProject_Add( OpenSSL
PREFIX "${CMAKE_BINARY_DIR}"
INSTALL_DIR "${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}"
URL "https://cern.ch/lcgpackages/tarFiles/sources/openssl-1.1.1.tar.gz"
URL_MD5 "7079eb017429e0ffb9efb42bf80ccb21"
CONFIGURE_COMMAND <SOURCE_DIR>/config --prefix=${_opensslBuildDir}
UPDATE_COMMAND ""
UPDATE_DISCONNECTED 1
LOG_CONFIGURE 1 LOG_DOWNLOAD 1 LOG_BUILD 1 LOG_INSTALL 1 )
ExternalProject_Add_Step( OpenSSL buildinstall
COMMAND ${CMAKE_COMMAND} -E copy_directory
${_opensslBuildDir}/ <INSTALL_DIR>
COMMENT "Installing OpenSSL into the build area"
DEPENDEES install )
add_dependencies( Package_Python OpenSSL )
install( DIRECTORY "${_opensslBuildDir}/"
DESTINATION . USE_SOURCE_PERMISSIONS OPTIONAL )
list( APPEND _extraArgs --with-openssl=${_opensslBuildDir} )
endif()
message(STATUS "BUILDING: Python 3.8.6 (user requested or no suitable version found)")
# The source code for Python:
set( _source "https://cern.ch/lcgpackages/tarFiles/sources/Python-3.8.6.tgz" )
set( _md5 "ea132d6f449766623eee886966c7d41f" )
# Temporary directory for the build results:
set( _buildDir ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/PythonBuild )
# Extra environment options for the configuration.
set( _compilerSetup )
set( _cflags )
set( _ldflags )
if( APPLE )
list( APPEND _ldflags -Wl,-rpath,'@loader_path/../lib' )
else()
list( APPEND _compilerSetup
"export CC=${CMAKE_C_COMPILER}"
"export CXX=${CMAKE_CXX_COMPILER}" )
list( APPEND _ldflags -Wl,-rpath,'\\$\\$ORIGIN/../lib' )
endif()
list( APPEND _ldflags -L${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}/lib
-L${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}/lib64 )
if( CMAKE_OSX_SYSROOT )
list( APPEND _cflags -isysroot ${CMAKE_OSX_SYSROOT}
-I${CMAKE_OSX_SYSROOT}/usr/include )
list( APPEND _ldflags -isysroot ${CMAKE_OSX_SYSROOT} )
endif()
# Massage the options to make them usable in the configuration script.
string( REPLACE ";" "\n" _compilerSetup "${_compilerSetup}" )
string( REPLACE ";" " " _cflags "${_cflags}" )
string( REPLACE ";" " " _ldflags "${_ldflags}" )
string( REPLACE ";" " " _extraArgs "${_extraArgs}" )
# Create the scripts used in the build.
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/sanitizeConfig.sh.in
${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/sanitizeConfig.sh @ONLY )
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/configure.sh.in
${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/configure.sh @ONLY )
# Files/directories generated by the build.
set( Python_EXECUTABLE "${_buildDir}/bin/python3" )
set( Python_INCLUDE_DIR "${_buildDir}/include/python3.8" )
file( MAKE_DIRECTORY "${Python_INCLUDE_DIR}" )
set( Python_LIBRARY
"${_buildDir}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}python3.8${CMAKE_SHARED_LIBRARY_SUFFIX}" )
# Set up the build of Python in the build directory:
ExternalProject_Add( Python
PREFIX ${CMAKE_BINARY_DIR}
INSTALL_DIR ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}
LOG_DOWNLOAD ON LOG_CONFIGURE ON LOG_BUILD ON LOG_INSTALL ON
URL ${_source}
URL_MD5 ${_md5}
CONFIGURE_COMMAND
${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/configure.sh
INSTALL_COMMAND make install
COMMAND ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/sanitizeConfig.sh
COMMAND ${CMAKE_COMMAND} -E create_symlink python3 ${_buildDir}/bin/python
COMMAND ${CMAKE_COMMAND} -E create_symlink python3-config
${_buildDir}/bin/python-config
COMMAND ${CMAKE_COMMAND} -E create_symlink pydoc3 ${_buildDir}/bin/pydoc
COMMAND ${CMAKE_COMMAND} -E copy_directory ${_buildDir}/ <INSTALL_DIR>
BUILD_BYPRODUCTS "${Python_LIBRARY}" )
ExternalProject_Add_Step( Python forcedownload
COMMAND ${CMAKE_COMMAND} -E echo "Forcing the re-download of Python (2020.11.13. - 3.8.6)"
DEPENDERS download )
ExternalProject_Add_Step( Python purgeBuild
COMMAND ${CMAKE_COMMAND} -E remove_directory "<BINARY_DIR>"
COMMAND ${CMAKE_COMMAND} -E make_directory "<BINARY_DIR>"
COMMAND ${CMAKE_COMMAND} -E remove_directory "${_buildDir}"
COMMENT "Removing previous build results for Python"
DEPENDEES download
DEPENDERS patch )
add_dependencies( Package_Python Python )
if(NOT LIBFFI_FOUND)
add_dependencies( Python libffi )
endif()
if(NOT OPENSSL_FOUND)
add_dependencies( Python OpenSSL )
endif()
# Install Python:
install( DIRECTORY ${_buildDir}/
DESTINATION . USE_SOURCE_PERMISSIONS OPTIONAL )
# Set up imported targets that could be used by other packages in their builds.
add_executable( Python::Interpreter IMPORTED GLOBAL )
set_target_properties( Python::Interpreter PROPERTIES
IMPORTED_LOCATION "${Python_EXECUTABLE}" )
add_library( Python::Python SHARED IMPORTED GLOBAL )
set_target_properties( Python::Python PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${Python_INCLUDE_DIR}"
IMPORTED_LOCATION "${Python_LIBRARY}" )
# Clean up:
unset( _source )
unset( _md5 )
unset( _buildDir )
unset( _compilerSetup )
unset( _cflags )
unset( _ldflags )
unset( _extraArgs )
Python
======
This package is used to build Python for the offline / analysis release.
While most platforms provide Python natively, the ATLAS software strictly
needs Python 2.7.X to work. Which is not the system default on SLC6 most
notably. So we need to build our own version.
Also on the latest versions of macOS we are unable to use the system
default python version when SIP is enabled. So there we are also
forced to build it ourselves if the user doesn't have a custom build
in their environment already.
The package only builds Python if the `ATLAS_BUILD_PYTHON` (cache)
variable is set to `TRUE`. It's the responsibility of the project
building this "package" to set a correct value for that variable,
allowing the user to override it from the command line if necessary.
#!/bin/bash
#
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
#
# Script configuring the standalone build of Python.
#
# (Optionally) Set up the compiler.
@_compilerSetup@
# Set up the compiler and linker flags to use.
export CFLAGS="@_cflags@"
export LDFLAGS="@_ldflags@"
# Allow Python to find libffi.
export PKG_CONFIG_PATH=@CMAKE_LIBRARY_OUTPUT_DIRECTORY@/pkgconfig
# Configure the build.
@CMAKE_BINARY_DIR@@CMAKE_FILES_DIRECTORY@/atlas_build_run.sh \
@CMAKE_BINARY_DIR@/src/Python/configure --prefix=@_buildDir@ --enable-shared \
--enable-unicode=ucs4 --enable-ipv6 --without-ensurepip @_extraArgs@
#!/bin/bash
#
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
#
# Script used to sanitize the python installation produced by the build,
# so that it would be relocatable.
#
# Note that all sed commands use ":" as the separator in the sed expressions,
# so that path names (which have plenty of "/" in them) would not have to be
# massaged before giving them to the command.
#
# Fail on errors:
set -e
# Loop over the executable scripts that need to be massaged:
for script in @_buildDir@/bin/python3.8-config \
@_buildDir@/bin/2to3-3.8 \
@_buildDir@/bin/idle3.8 \
@_buildDir@/bin/pydoc3.8; do
# Create a sanitized version of the script, by just replacing
# its first line with a relocatable expression:
sed -i -e '1s:.*:#!/usr/bin/env python3:' ${script}
done
# Create a sanitized version of _sysconfigdata.py, using sed:
sed -i -e '1i\
import os; installdir=os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))' \
@_buildDir@/lib/python3.8/_sysconfigdata*.py
sed -i -e "s:'@_buildDir@:installdir + ':g" \
@_buildDir@/lib/python3.8/_sysconfigdata*.py
sed -i -e "s:installdir + '\(.*\)'$:installdir + '\1' +:g" \
@_buildDir@/lib/python3.8/_sysconfigdata*.py
......@@ -4,13 +4,14 @@
#
if (NOT ATLAS_BUILD_ROOT )
message(STATUS "No ROOT build requested")
return()
endif()
# Set the name of the package:
atlas_subdir( ROOT )
message(STATUS "BUILDING: ROOT ${STATANA_ROOT_VERSION} as part of release")
# Temporary directory for the build results:
set( _buildDir ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/ROOTBuild )
......@@ -19,12 +20,8 @@ set( _extraArgs )
if( APPLE )
list( APPEND _extraArgs -Dvc:BOOL=OFF -Drpath:BOOL=ON )
endif()
if( "${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR
"${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo" )
list( APPEND _extraArgs -DCMAKE_BUILD_TYPE:STRING=Release )
elseif( NOT "${CMAKE_BUILD_TYPE}" STREQUAL "" )
list( APPEND _extraArgs -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} )
endif()
list( APPEND _extraArgs -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} )
# Set the C++ standard for the build.
if( NOT "${CMAKE_CXX_STANDARD}" STREQUAL "" )
......@@ -58,14 +55,14 @@ else()
endif()
# ...and TBB.
if( ATLAS_BUILD_TBB )
list( APPEND _extraArgs
-DTBB_ROOT_DIR:PATH=${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM} )
else()
find_package( TBB REQUIRED )
get_filename_component( TBB_ROOT_DIR ${TBB_INCLUDE_DIR} DIRECTORY )
list( APPEND _extraArgs -DTBB_ROOT_DIR:PATH=${TBB_ROOT_DIR} )
endif()
#if( ATLAS_BUILD_TBB )
# list( APPEND _extraArgs
# -DTBB_ROOT_DIR:PATH=${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM} )
#else()
# find_package( TBB REQUIRED )
# get_filename_component( TBB_ROOT_DIR ${TBB_INCLUDE_DIR} DIRECTORY )
# list( APPEND _extraArgs -DTBB_ROOT_DIR:PATH=${TBB_ROOT_DIR} )
#endif()
# ...and XRootD. Note that if we are not building XRootD ourselves, we
# just leave it up to ROOT to find it the best that it can.
......@@ -98,6 +95,8 @@ if( "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" OR
list( APPEND _extraArgs -Dbuiltin_fftw3:BOOL=ON )
endif()
list( APPEND _extraArgs -Dminuit2:BOOL=ON )
# Generate the script that will configure the build of ROOT.
string( REPLACE ";" " " _configureArgs "${_extraArgs}" )
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/configure.sh.in
......@@ -111,20 +110,23 @@ unset( _configureArgs )
# The source and version of ROOT to build.
set( ATLAS_ROOT_SOURCE "GIT_REPOSITORY;https://github.com/root-project/root.git"
CACHE STRING "Source for the ROOT build" )
set( ATLAS_ROOT_VERSION "GIT_TAG;v6-24-06"
set( ATLAS_ROOT_VERSION "GIT_TAG;${STATANA_ROOT_VERSION}"
CACHE STRING "The 'version' of the ROOT source for its build" )
mark_as_advanced( ATLAS_ROOT_SOURCE ATLAS_ROOT_VERSION )
# Build ROOT:
ExternalProject_Add( ROOT
PREFIX ${CMAKE_BINARY_DIR}
INSTALL_DIR ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}
SOURCE_DIR ${CMAKE_BINARY_DIR}/src/ROOT
LOG_DOWNLOAD ON LOG_CONFIGURE ON LOG_BUILD OFF LOG_INSTALL ON LOG_OUTPUT_ON_FAILURE ON
${ATLAS_ROOT_SOURCE}
${ATLAS_ROOT_VERSION}
CONFIGURE_COMMAND
${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/configure.sh
UPDATE_DISCONNECTED TRUE) # skips reconfigure+build if just rerunning - need to clean build area to get recheckout
UPDATE_COMMAND "" # needed for next line to work
UPDATE_DISCONNECTED TRUE) # skips reconfigure+build if just rerunning. Note: need to remove src/ROOT-stamp dir to recheckout code
ExternalProject_Add_Step( ROOT forcedownload
COMMAND ${CMAKE_COMMAND} -E echo "Forcing the re-download of ROOT"
DEPENDERS download )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment