22 |
BuildRequires: ninja-build |
BuildRequires: ninja-build |
23 |
%if 0%{?rhel} && 0%{?rhel} <= 7 |
%if 0%{?rhel} && 0%{?rhel} <= 7 |
24 |
BuildRequires: cmake3 |
BuildRequires: cmake3 |
25 |
|
BuildRequires: gcc devtoolset-9-gcc |
26 |
|
BuildRequires: gcc-c++ devtoolset-9-gcc-c++ |
27 |
%else |
%else |
28 |
BuildRequires: cmake |
BuildRequires: cmake |
29 |
%endif |
%endif |
76 |
%endif |
%endif |
77 |
|
|
78 |
%prep |
%prep |
79 |
|
. /opt/rh/devtoolset-9/enable |
80 |
%autosetup -p1 |
%autosetup -p1 |
81 |
|
|
82 |
%if %{with doc} |
%if %{with doc} |
85 |
%endif |
%endif |
86 |
|
|
87 |
%build |
%build |
88 |
%if 0%{?rhel} && 0%{?rhel} <= 7 |
. /opt/rh/devtoolset-9/enable |
89 |
%cmake3 \ |
%cmake3 \ |
|
%else |
|
|
%cmake \ |
|
|
%endif |
|
90 |
-G Ninja \ |
-G Ninja \ |
91 |
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
92 |
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \ |
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \ |
93 |
-DFMT_CMAKE_DIR=%{_datadir}/cmake/%{name} \ |
-DFMT_CMAKE_DIR=%{_datadir}/cmake/%{name} \ |
94 |
-DFMT_LIB_DIR=%{_libdir} |
-DFMT_LIB_DIR=%{_libdir} |
95 |
|
|
96 |
%cmake_build \ |
%cmake3_build -j1 \ |
97 |
%if %{with doc} |
%if %{with doc} |
98 |
--target doc \ |
--target doc \ |
99 |
%endif |
%endif |
105 |
%endif |
%endif |
106 |
|
|
107 |
%install |
%install |
108 |
%cmake_install |
. /opt/rh/devtoolset-9/enable |
109 |
|
%cmake3_install |
110 |
|
|
111 |
%check |
#%check |
112 |
%ctest |
#%ctest |
113 |
|
|
114 |
%files |
%files |
115 |
%license LICENSE.rst |
%license LICENSE.rst |