Skip to content

Commit 3e8f958

Browse files
authored
Merge pull request #10119 from cms-sw/update_Catch2
Update Catch2 from v2 to v3
2 parents fcaf802 + 38c18f0 commit 3e8f958

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

catch2.spec

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,28 @@
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+
-DBUILD_SHARED_LIBS=ON \
16+
-DCMAKE_INSTALL_PREFIX="%{i}" \
17+
-DCATCH_INSTALL_HELPERS=ON \
18+
-DCATCH_INSTALL_EXTRAS=ON \
19+
-DCMAKE_INSTALL_COMPONENT="devel"
20+
21+
make %{makeprocesses} VERBOSE=1
722

823
%install
9-
mkdir %{i}/include
10-
cp %{_sourcedir}/catch.hpp %{i}/include/
24+
cd %{_builddir}/build
25+
make install
26+
27+
%post
28+
%{relocateConfig}share/pkgconfig/catch2*.pc
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)