Skip to content

Commit

Permalink
for multi-arch set SCRAM_TARGET to auto MULTIARCH/SKYLAKE otherwise t…
Browse files Browse the repository at this point in the history
…o default
  • Loading branch information
smuzaffar committed Apr 24, 2024
1 parent 9e5e5f9 commit d28220a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
4 changes: 2 additions & 2 deletions SCRAMV1.spec
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
### RPM lcg SCRAMV1 V3_00_68
### RPM lcg SCRAMV1 V3_00_69
## NOCOMPILER
## NO_VERSION_SUFFIX

%define tag 15a8797db3180ba786e6e131a9c4e3011b53bc68
%define tag f06afeba5ec011dd62e723a6490513bfddec7012
%define branch SCRAMV3
%define github_user cms-sw
Source: git+https://github.com/%{github_user}/SCRAM.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}-%{tag}.tgz
Expand Down
7 changes: 7 additions & 0 deletions cmssw-queue-override.file
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,10 @@ Source20: CXXModules.mk
%define patchsrc20 cp %{_sourcedir}/CXXModules.mk config/SCRAM/GMake/CXXModules.mk
%endif

%if "%(case %realversion in (*MULTIARCH*) echo true ;; (*) echo false ;; esac)" == "true"
%define scram_target_default auto
%endif

%if "%(case %realversion in (*SKYLAKE*) echo true ;; (*) echo false ;; esac)" == "true"
%define scram_target_default auto
%endif
11 changes: 9 additions & 2 deletions scram-project-build.file
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@
%define cmssw_libs biglib/%{cmsplatf} lib/%{cmsplatf}
%define scram_home_suffix %(echo %{directpkgreqs} | grep -q /SCRAMV1/V2_ && echo /src || true)
%define scram_script_prefix %(echo %{directpkgreqs} | grep -q /SCRAMV1/V2_ && echo .pl || echo .py)

%if "%{?pkgname}" != "coral"
%if "%{?package_vectorization}" != ""
%define vectorized_build yes
%if "%{?scram_target_default:set}" != "set"
%define scram_target_default default
%endif
%endif
%endif

%if "%{?pgo_generate}"
%undefine runGlimpse
%undefine saveDeps
Expand Down Expand Up @@ -55,7 +60,7 @@ BuildRequires: dwz
%endif

%if "%{?configtag:set}" != "set"
%define configtag V09-04-03
%define configtag V09-04-04
%endif

%if "%{?buildarch:set}" != "set"
Expand Down Expand Up @@ -123,10 +128,12 @@ echo %{configtag} > %_builddir/config/config_tag
%else
--keys ENABLE_PGO=0
%endif

%if "%{?vectorized_build:set}" == "set"
sed -i -e 's| SCRAM_TARGETS=.*"| SCRAM_TARGETS="%{package_vectorization}"|' %_builddir/config/Self.xml
sed -i -e 's|</tool>|<runtime name="SCRAM_TARGET" value="auto"/><runtime name="USER_TARGETS_ALL" value="1"/></tool>|' %_builddir/config/Self.xml
sed -i -e 's|</tool>|<runtime name="SCRAM_TARGET" value="%{scram_target_default}"/><runtime name="USER_TARGETS_ALL" value="1"/></tool>|' %_builddir/config/Self.xml
%endif

%if "%{?release_usercxxflags:set}" == "set"
echo '<flags CXXFLAGS="%{release_usercxxflags}"/>' >> %_builddir/config/BuildFile.xml
%endif
Expand Down

0 comments on commit d28220a

Please sign in to comment.