Skip to content

Commit

Permalink
Merge pull request #7655 from mkirsano/addhepmc3
Browse files Browse the repository at this point in the history
Addhepmc3
  • Loading branch information
smuzaffar authored Mar 2, 2022
2 parents 7e78b16 + fddfe83 commit cd14c8d
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmssw-tool-conf.spec
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Requires: gsl
Requires: highfive
Requires: hector
Requires: hepmc
Requires: hepmc3
Requires: heppdt
Requires: herwig
Requires: herwig7
Expand Down
33 changes: 33 additions & 0 deletions hepmc3.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
### RPM external hepmc3 3.2.5

Source: https://gitlab.cern.ch/hepmc/HepMC3/-/archive/3.2.5/HepMC3-%{realversion}.tar.gz

BuildRequires: cmake

%define drop_files %i/share

%prep
%setup -q -n HepMC3-%{realversion}

%build
sed 's/SOVERSION 3//' < CMakeLists.txt > tmpsed.txt
mv tmpsed.txt CMakeLists.txt
cd search
sed 's/SOVERSION 4//' < CMakeLists.txt > tmpsed.txt
mv tmpsed.txt CMakeLists.txt
cd ..
rm -rf ../build
mkdir ../build
cd ../build

cmake ../HepMC3-%{realversion} \
-DHEPMC3_ENABLE_ROOTIO:BOOL=OFF -DHEPMC3_ENABLE_TEST:BOOL=OFF \
-DHEPMC3_INSTALL_INTERFACES:BOOL=ON -DHEPMC3_ENABLE_PYTHON:BOOL=OFF \
-DHEPMC3_BUILD_STATIC_LIBS:BOOL=OFF -DHEPMC3_BUILD_DOCS:BOOL=OFF \
-DCMAKE_INSTALL_PREFIX:PATH="%i"

make %{makeprocesses}

%install
cd ../build
make install
10 changes: 10 additions & 0 deletions scram-tools.file/tools/hepmc3/hepmc3.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<tool name="hepmc3" version="@TOOL_VERSION@">
<lib name="HepMC3"/>
<lib name="HepMC3search"/>
<client>
<environment name="HEPMC3_BASE" default="@TOOL_ROOT@"/>
<environment name="LIBDIR" default="$HEPMC3_BASE/lib64"/>
<environment name="INCLUDE" default="$HEPMC3_BASE/include"/>
</client>
<runtime name="CMSSW_FWLITE_INCLUDE_PATH" value="$HEPMC3_BASE/include" type="path"/>
</tool>

0 comments on commit cd14c8d

Please sign in to comment.