Skip to content
Snippets Groups Projects
Commit 84983dba authored by Marco Clemencic's avatar Marco Clemencic
Browse files

Add support for the virtual BINARY_TAG x86_64-centos7-gcc9+py3-opt

which means use LCG_XYpython3 instead of LCG_XY
parent dd5e716e
No related branches found
No related tags found
1 merge request!1099Add support for special LCG versions
#####################################################################################
# (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations #
# (c) Copyright 1998-2020 CERN for the benefit of the LHCb and ATLAS collaborations #
# #
# This software is distributed under the terms of the Apache version 2 licence, #
# copied verbatim in the file "LICENSE". #
......@@ -85,9 +85,8 @@ build:gcc9:opt:python3:
tags:
- cvmfs
variables:
BINARY_TAG: x86_64-centos7-gcc9-opt
BINARY_TAG: x86_64-centos7-gcc9+py3-opt
BUILDDIR: build-opt-python3
HEPTOOLS_VERSION: 97apython3
script:
- ci-utils/build
artifacts:
......@@ -203,7 +202,7 @@ test:gcc9:opt:python3:
tags:
- cvmfs
variables:
BINARY_TAG: x86_64-centos7-gcc9-opt
BINARY_TAG: x86_64-centos7-gcc9+py3-opt
BUILDDIR: build-opt-python3
script:
- ci-utils/test
......
#!/bin/bash -e
#####################################################################################
# (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations #
# (c) Copyright 1998-2020 CERN for the benefit of the LHCb and ATLAS collaborations #
# #
# This software is distributed under the terms of the Apache version 2 licence, #
# copied verbatim in the file "LICENSE". #
......@@ -12,7 +12,7 @@
. $(dirname $0)/env_setup.sh
${LCG_release_area}/ccache/${CCACHE_VERSION}/${BINARY_TAG}/bin/ccache -z -F 2000
${LCG_release_area}/ccache/${CCACHE_VERSION}/${BINARY_TAG/+py3/}/bin/ccache -z -F 2000
echo 'set(CMAKE_USE_CCACHE ON CACHE BOOL "")' >> cache_preload.cmake
......@@ -22,4 +22,4 @@ echo 'set(CMAKE_USE_CCACHE ON CACHE BOOL "")' >> cache_preload.cmake
make BUILDDIR=${BUILDDIR}
"
${LCG_release_area}/ccache/${CCACHE_VERSION}/${BINARY_TAG}/bin/ccache -s
${LCG_release_area}/ccache/${CCACHE_VERSION}/${BINARY_TAG/+py3/}/bin/ccache -s
#####################################################################################
# (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations #
# (c) Copyright 1998-2020 CERN for the benefit of the LHCb and ATLAS collaborations #
# #
# This software is distributed under the terms of the Apache version 2 licence, #
# copied verbatim in the file "LICENSE". #
......@@ -114,6 +114,11 @@ macro(parse_binary_tag)
set(${_variable}_MICROARCH)
endif()
if(${_variable}_COMP MATCHES "\\+")
string(REGEX MATCHALL "[^+]+" ${_variable}_COMP_SUBTYPE "${${_variable}_COMP}")
list(GET ${_variable}_COMP_SUBTYPE 0 ${_variable}_COMP)
list(REMOVE_AT ${_variable}_COMP_SUBTYPE 0)
endif()
if(${_variable}_COMP MATCHES "([^0-9.]+)([0-9.]+)")
set(${_variable}_COMP_NAME ${CMAKE_MATCH_1})
set(${_variable}_COMP_VERSION ${CMAKE_MATCH_2})
......@@ -277,6 +282,17 @@ function(compatible_binary_tags variable)
# - finally reverse the list
list(REVERSE archs)
# prepare the list of compiler sub-types (if needed)
set(comps ${BINARY_TAG_COMP})
if(BINARY_TAG_COMP_SUBTYPE)
set(subtype ${BINARY_TAG_COMP})
foreach(st ${BINARY_TAG_COMP_SUBTYPE})
set(subtype "${subtype}+${st}")
list(APPEND comps "${subtype}")
endforeach()
list(REVERSE comps)
endif()
# prepare the list of build sub-types (if needed)
set(subtypes)
if(BINARY_TAG_SUBTYPE)
......@@ -291,11 +307,13 @@ function(compatible_binary_tags variable)
set(out)
foreach(a ${archs})
foreach(t ${types})
foreach(st ${subtypes})
list(APPEND out "${a}-${BINARY_TAG_OS}-${BINARY_TAG_COMP}-${t}${st}")
foreach(c ${comps})
foreach(st ${subtypes})
list(APPEND out "${a}-${BINARY_TAG_OS}-${c}-${t}${st}")
endforeach()
# the list of subtypes might be empty, so we explicitly add the simple tag
list(APPEND out "${a}-${BINARY_TAG_OS}-${c}-${t}")
endforeach()
# the list of subtypes might be empty, so we explicitly add the simple tag
list(APPEND out "${a}-${BINARY_TAG_OS}-${BINARY_TAG_COMP}-${t}")
endforeach()
endforeach()
......
#####################################################################################
# (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations #
# (c) Copyright 1998-2020 CERN for the benefit of the LHCb and ATLAS collaborations #
# #
# This software is distributed under the terms of the Apache version 2 licence, #
# copied verbatim in the file "LICENSE". #
......@@ -37,18 +37,24 @@ macro(use_heptools heptools_version)
LCG_externals_${LCG_SYSTEM}-opt.txt)
endif()
if("${BINARY_TAG_COMP_SUBTYPE}" MATCHES "py3")
set(_lcg_py3 python3)
else()
set(_lcg_py3)
endif()
# Find the toolchain description
find_file(LCG_TOOLCHAIN_INFO
NAMES ${_info_names}
HINTS ENV CMTPROJECTPATH
PATH_SUFFIXES LCG_${heptools_version})
PATH_SUFFIXES LCG_${heptools_version}${_lcg_py3})
if(LCG_TOOLCHAIN_INFO)
message(STATUS "Using heptools ${heptools_version} from ${LCG_TOOLCHAIN_INFO}")
get_filename_component(LCG_releases ${LCG_TOOLCHAIN_INFO} PATH CACHE)
set(LCG_external ${LCG_releases})
if(LCG_releases MATCHES "LCG_${heptools_version}\$")
if(LCG_releases MATCHES "LCG_${heptools_version}${_lcg_py3}\$")
get_filename_component(LCG_releases_base ${LCG_releases} PATH)
else()
set(LCG_releases_base ${LCG_releases})
......@@ -93,7 +99,7 @@ macro(use_heptools heptools_version)
# CACHE FILEPATH "The CMake toolchain file" FORCE)
else()
message(FATAL_ERROR "Cannot find heptools ${heptools_version}.")
message(FATAL_ERROR "Cannot find heptools ${heptools_version} (using suffix LCG_${heptools_version}${_lcg_py3}).")
endif()
endmacro()
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