File Catch.spec of Package Catch

#
# spec file for package Catch
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           Catch
Version:        1.10.0
Release:        0
Summary:        A header-only test c++ framework
License:        BSL-1.0
Group:          Development/Libraries/C and C++
Url:            https://github.com/philsquared/Catch
Source:         https://github.com/philsquared/Catch/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires:  cmake >= 3.0
BuildRequires:  gcc-c++

%description
Catch ("C++ Automated Test Cases in Headers") is a multi-paradigm
automated test framework for C++ and Objective-C. Catch is delivered
as inline code, in header files only. It is compatible with C++98
and uses C++11/14 features if available.

%package devel
Summary: A header-only test c++ framework

%description devel
Catch ("C++ Automated Test Cases in Headers") is a multi-paradigm
automated test framework for C++ and Objective-C (and, maybe, C). It
can be used for unit-tests, test-driven development and
behavior-driven development. Catch is delivered as inline code, in
header files only. It is compatible with C++98 and uses C++11/14
features if downstream code selected such compiler modes.

%prep
%setup -q

%build
%cmake \
%if 0%{?suse_version} <= 1320
 -DUSE_CPP11=ON
%else
 -DUSE_CPP14=ON
%endif
make %{?_smp_mflags}

%check
cd build && make test

%install
%cmake_install

%files devel
%doc LICENSE.txt docs/*
%{_includedir}/catch

%changelog
openSUSE Build Service is sponsored by