Enable tests (PTUNIT) and man pages (MAN).

Change BuildRequires: gcc -> gcc-c++ as PTUNIT tests require C++.
This commit is contained in:
Jan Kratochvil 2018-03-05 23:49:28 +01:00
parent 86bded7fd3
commit 077239d088
2 changed files with 12 additions and 30 deletions

View File

@ -1,13 +1,14 @@
Name: libipt
Version: 1.6.1
Release: 7%{?dist}
Release: 8%{?dist}
Summary: Intel Processor Trace Decoder Library
License: BSD
URL: https://github.com/01org/processor-trace
Source0: https://github.com/01org/processor-trace/archive/v%{version}.tar.gz
Patch1: v1.6.1-implicit-fallthrough.patch
Patch2: v1.6.1-buildrequires-c.patch
BuildRequires: gcc cmake
# c++ is required only for -DPTUNIT test "ptunit-cpp".
# pandoc is for -DMAN.
BuildRequires: gcc-c++ cmake pandoc
ExclusiveArch: %{ix86} x86_64
%description
@ -29,12 +30,11 @@ develop programs that use the Intel Processor Trace (Intel PT) Decoder Library.
%prep
%setup -q -n processor-trace-%{version}
%patch1 -p1
%patch2 -p1
%build
# -DPTUNIT:BOOL=ON has no effect on ctest.
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DPTUNIT:BOOL=OFF \
-DPTUNIT:BOOL=ON \
-DMAN:BOOL=ON \
-DDEVBUILD:BOOL=ON \
.
make VERBOSE=1 %{?_smp_mflags}
@ -56,10 +56,15 @@ ctest -V %{?_smp_mflags}
%doc %{develdocs}
%{_includedir}/*
%{_libdir}/%{name}.so
%{_mandir}/*/*.gz
%changelog
* Mon Mar 5 2018 Jan Kratochvil <jan.kratochvil@redhat.com> - 1.6.1-8
- Enable tests (PTUNIT) and man pages (MAN).
- Change BuildRequires: gcc -> gcc-c++ as PTUNIT tests require C++.
* Sat Mar 3 2018 Jan Kratochvil <jan.kratochvil@redhat.com> - 1.6.1-7
- Add: BuildRequires: gcc-c++
- Add: BuildRequires: gcc
https://fedoraproject.org/wiki/Packaging:C_and_C%2B%2B#BuildRequires_and_Requires
* Fri Mar 2 2018 Jan Kratochvil <jan.kratochvil@redhat.com> - 1.6.1-6

View File

@ -1,23 +0,0 @@
commit 3543461d352d912722fcf51ceed4f0bb22f81342
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sat Mar 3 05:44:54 2018 +0100
Do not require C++ compiler
CMake requires both C and C++ compilers by default. Require only C.
Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 257ad1c..174a1c6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,7 +26,7 @@
cmake_minimum_required(VERSION 2.8.6)
-project(PT)
+project(PT C)
# versioning
#