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
Branches
No related tags found
No related merge requests found
##################################################################################### #####################################################################################
# (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, # # This software is distributed under the terms of the Apache version 2 licence, #
# copied verbatim in the file "LICENSE". # # copied verbatim in the file "LICENSE". #
...@@ -85,9 +85,8 @@ build:gcc9:opt:python3: ...@@ -85,9 +85,8 @@ build:gcc9:opt:python3:
tags: tags:
- cvmfs - cvmfs
variables: variables:
BINARY_TAG: x86_64-centos7-gcc9-opt BINARY_TAG: x86_64-centos7-gcc9+py3-opt
BUILDDIR: build-opt-python3 BUILDDIR: build-opt-python3
HEPTOOLS_VERSION: 97apython3
script: script:
- ci-utils/build - ci-utils/build
artifacts: artifacts:
...@@ -203,7 +202,7 @@ test:gcc9:opt:python3: ...@@ -203,7 +202,7 @@ test:gcc9:opt:python3:
tags: tags:
- cvmfs - cvmfs
variables: variables:
BINARY_TAG: x86_64-centos7-gcc9-opt BINARY_TAG: x86_64-centos7-gcc9+py3-opt
BUILDDIR: build-opt-python3 BUILDDIR: build-opt-python3
script: script:
- ci-utils/test - ci-utils/test
......
#!/bin/bash -e #!/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, # # This software is distributed under the terms of the Apache version 2 licence, #
# copied verbatim in the file "LICENSE". # # copied verbatim in the file "LICENSE". #
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
. $(dirname $0)/env_setup.sh . $(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 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 ...@@ -22,4 +22,4 @@ echo 'set(CMAKE_USE_CCACHE ON CACHE BOOL "")' >> cache_preload.cmake
make BUILDDIR=${BUILDDIR} 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, # # This software is distributed under the terms of the Apache version 2 licence, #
# copied verbatim in the file "LICENSE". # # copied verbatim in the file "LICENSE". #
...@@ -114,6 +114,11 @@ macro(parse_binary_tag) ...@@ -114,6 +114,11 @@ macro(parse_binary_tag)
set(${_variable}_MICROARCH) set(${_variable}_MICROARCH)
endif() 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.]+)") if(${_variable}_COMP MATCHES "([^0-9.]+)([0-9.]+)")
set(${_variable}_COMP_NAME ${CMAKE_MATCH_1}) set(${_variable}_COMP_NAME ${CMAKE_MATCH_1})
set(${_variable}_COMP_VERSION ${CMAKE_MATCH_2}) set(${_variable}_COMP_VERSION ${CMAKE_MATCH_2})
...@@ -277,6 +282,17 @@ function(compatible_binary_tags variable) ...@@ -277,6 +282,17 @@ function(compatible_binary_tags variable)
# - finally reverse the list # - finally reverse the list
list(REVERSE archs) 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) # prepare the list of build sub-types (if needed)
set(subtypes) set(subtypes)
if(BINARY_TAG_SUBTYPE) if(BINARY_TAG_SUBTYPE)
...@@ -291,11 +307,13 @@ function(compatible_binary_tags variable) ...@@ -291,11 +307,13 @@ function(compatible_binary_tags variable)
set(out) set(out)
foreach(a ${archs}) foreach(a ${archs})
foreach(t ${types}) foreach(t ${types})
foreach(c ${comps})
foreach(st ${subtypes}) foreach(st ${subtypes})
list(APPEND out "${a}-${BINARY_TAG_OS}-${BINARY_TAG_COMP}-${t}${st}") list(APPEND out "${a}-${BINARY_TAG_OS}-${c}-${t}${st}")
endforeach() endforeach()
# the list of subtypes might be empty, so we explicitly add the simple tag # 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}") list(APPEND out "${a}-${BINARY_TAG_OS}-${c}-${t}")
endforeach()
endforeach() endforeach()
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, # # This software is distributed under the terms of the Apache version 2 licence, #
# copied verbatim in the file "LICENSE". # # copied verbatim in the file "LICENSE". #
...@@ -37,18 +37,24 @@ macro(use_heptools heptools_version) ...@@ -37,18 +37,24 @@ macro(use_heptools heptools_version)
LCG_externals_${LCG_SYSTEM}-opt.txt) LCG_externals_${LCG_SYSTEM}-opt.txt)
endif() endif()
if("${BINARY_TAG_COMP_SUBTYPE}" MATCHES "py3")
set(_lcg_py3 python3)
else()
set(_lcg_py3)
endif()
# Find the toolchain description # Find the toolchain description
find_file(LCG_TOOLCHAIN_INFO find_file(LCG_TOOLCHAIN_INFO
NAMES ${_info_names} NAMES ${_info_names}
HINTS ENV CMTPROJECTPATH HINTS ENV CMTPROJECTPATH
PATH_SUFFIXES LCG_${heptools_version}) PATH_SUFFIXES LCG_${heptools_version}${_lcg_py3})
if(LCG_TOOLCHAIN_INFO) if(LCG_TOOLCHAIN_INFO)
message(STATUS "Using heptools ${heptools_version} from ${LCG_TOOLCHAIN_INFO}") message(STATUS "Using heptools ${heptools_version} from ${LCG_TOOLCHAIN_INFO}")
get_filename_component(LCG_releases ${LCG_TOOLCHAIN_INFO} PATH CACHE) get_filename_component(LCG_releases ${LCG_TOOLCHAIN_INFO} PATH CACHE)
set(LCG_external ${LCG_releases}) 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) get_filename_component(LCG_releases_base ${LCG_releases} PATH)
else() else()
set(LCG_releases_base ${LCG_releases}) set(LCG_releases_base ${LCG_releases})
...@@ -93,7 +99,7 @@ macro(use_heptools heptools_version) ...@@ -93,7 +99,7 @@ macro(use_heptools heptools_version)
# CACHE FILEPATH "The CMake toolchain file" FORCE) # CACHE FILEPATH "The CMake toolchain file" FORCE)
else() 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() endif()
endmacro() endmacro()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment