Skip to content

Commit 1b42c1e

Browse files
committed
Updates for Catch2 v2->v3 cmssw#49121
1 parent 510ebb1 commit 1b42c1e

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

catch2.spec

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
1-
### RPM external catch2 2.13.6
2-
Source: https://raw.githubusercontent.com/catchorg/Catch2/v%{realversion}/single_include/catch2/catch.hpp
1+
### RPM external catch2 3.11.0
2+
3+
Source: https://github.com/catchorg/Catch2/archive/refs/tags/v%{realversion}.tar.gz
4+
BuildRequires: cmake gmake
35

46
%prep
7+
%setup -n Catch2-%{realversion}
58

69
%build
10+
cd %{_builddir}
11+
rm -rf build && mkdir build && cd build
12+
13+
cmake ../Catch2-%{realversion} \
14+
-DCMAKE_BUILD_TYPE=Release \
15+
-DCMAKE_INSTALL_PREFIX="%{i}" \
16+
-DCATCH_INSTALL_HELPERS=ON \
17+
-DCATCH_INSTALL_EXTRAS=ON \
18+
-DCMAKE_INSTALL_COMPONENT="devel"
19+
20+
make %{makeprocesses}
721

822
%install
9-
mkdir %{i}/include
10-
cp %{_sourcedir}/catch.hpp %{i}/include/
23+
cd %{_builddir}/build
24+
make install
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
<tool name="@TOOL@" version="@TOOL_VERSION@" revision="2">
1+
<tool name="@TOOL@" version="@TOOL_VERSION@" revision="3">
2+
<lib name="Catch2Main"/>
3+
<lib name="Catch2"/>
24
<client>
35
<environment name="@TOOL_BASE@" default="@TOOL_ROOT@"/>
4-
<environment name="INCLUDE" default="$@TOOL_BASE@/include"/>
6+
<environment name="INCLUDE" default="$@TOOL_BASE@/include"/>
7+
<environment name="LIBDIR" default="$@TOOL_BASE@/lib64"/>
58
</client>
69
</tool>

0 commit comments

Comments
 (0)