feat: init
This commit is contained in:
parent
87ae94547c
commit
381af8bf40
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/highfive-2.2.2.tar.gz
|
@ -0,0 +1,30 @@
|
|||||||
|
From 7434d54b84ce54fae950d505de4ff0d772f63e94 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nicolas Cornu <nicolas.cornu@epfl.ch>
|
||||||
|
Date: Fri, 25 Sep 2020 17:14:11 +0200
|
||||||
|
Subject: [PATCH] Use std::move in NRVO depending of version of GCC (#375)
|
||||||
|
|
||||||
|
Before version 10, GCC warns if not used.
|
||||||
|
After version 10, GCC warns if used.
|
||||||
|
---
|
||||||
|
include/highfive/bits/H5Reference_misc.hpp | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/include/highfive/bits/H5Reference_misc.hpp b/include/highfive/bits/H5Reference_misc.hpp
|
||||||
|
index 7c892c1..b4aea3e 100644
|
||||||
|
--- a/include/highfive/bits/H5Reference_misc.hpp
|
||||||
|
+++ b/include/highfive/bits/H5Reference_misc.hpp
|
||||||
|
@@ -43,7 +43,11 @@ inline T Reference::dereference(const Object& location) const {
|
||||||
|
HDF5ErrMapper::ToException<ReferenceException>(
|
||||||
|
"Trying to dereference the wrong type");
|
||||||
|
}
|
||||||
|
+#if defined __GNUC__ && __GNUC__ < 9
|
||||||
|
return std::move(obj);
|
||||||
|
+#else
|
||||||
|
+ return obj;
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
inline Object Reference::get_ref(const Object& location) const {
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
135
highfive.spec
Normal file
135
highfive.spec
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
%global pretty_name HighFive
|
||||||
|
|
||||||
|
%global _description %{expand:
|
||||||
|
HighFive is a modern header-only C++11 friendly interface for libhdf5.
|
||||||
|
|
||||||
|
HighFive supports STL vector/string, Boost::UBLAS, Boost::Multi-array, Eigen
|
||||||
|
and Xtensor. It handles C++ from/to HDF5 with automatic type mapping. HighFive
|
||||||
|
does not require additional libraries (see dependencies) and supports both HDF5
|
||||||
|
thread safety and Parallel HDF5 (contrary to the official hdf5 cpp)
|
||||||
|
|
||||||
|
It integrates nicely with other CMake projects by defining (and exporting) a
|
||||||
|
HighFive target.
|
||||||
|
|
||||||
|
Design:
|
||||||
|
- Simple C++-ish minimalist interface
|
||||||
|
- No other dependency than libhdf5
|
||||||
|
- Zero overhead
|
||||||
|
- Support C++11
|
||||||
|
|
||||||
|
Feature support:
|
||||||
|
- create/read/write files, datasets, attributes, groups, dataspaces.
|
||||||
|
- automatic memory management / ref counting
|
||||||
|
- automatic conversion of std::vector and nested std::vector from/to any
|
||||||
|
dataset with basic types
|
||||||
|
- automatic conversion of std::string to/from variable length string dataset
|
||||||
|
- selection() / slice support
|
||||||
|
- parallel Read/Write operations from several nodes with Parallel HDF5
|
||||||
|
- Advanced types: Compound, Enum, Arrays of Fixed-length strings, References
|
||||||
|
etc... (see ChangeLog)
|
||||||
|
}
|
||||||
|
|
||||||
|
%bcond_without tests
|
||||||
|
%bcond_without docs
|
||||||
|
|
||||||
|
# Header only, so no debuginfo is generated
|
||||||
|
%global debug_package %{nil}
|
||||||
|
|
||||||
|
Name: highfive
|
||||||
|
Version: 2.2.2
|
||||||
|
Release: 1%{?dist}
|
||||||
|
Summary: Header-only C++ HDF5 interface
|
||||||
|
|
||||||
|
License: Boost
|
||||||
|
URL: https://bluebrain.github.io/HighFive/
|
||||||
|
Source0: https://github.com/BlueBrain/HighFive/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||||
|
# Do not use std::move in return
|
||||||
|
Patch0: 0001-Use-std-move-in-NRVO-depending-of-version-of-GCC-375.patch
|
||||||
|
|
||||||
|
BuildRequires: boost-devel
|
||||||
|
BuildRequires: cmake
|
||||||
|
BuildRequires: gcc-c++
|
||||||
|
BuildRequires: git-core
|
||||||
|
BuildRequires: hdf5-devel
|
||||||
|
BuildRequires: ninja-build
|
||||||
|
|
||||||
|
# Optional but included in Fedora, so we use these
|
||||||
|
BuildRequires: eigen3-devel
|
||||||
|
BuildRequires: xtensor-devel
|
||||||
|
|
||||||
|
%if %{with docs}
|
||||||
|
BuildRequires: doxygen
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# Does not build on 32 bit architectures
|
||||||
|
# Issue filed upstream: https://github.com/BlueBrain/HighFive/issues/443
|
||||||
|
ExcludeArch: %{ix86} %{arm32}
|
||||||
|
|
||||||
|
%description %_description
|
||||||
|
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Development files for %{name}
|
||||||
|
Provides: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
Provides: %{name}-static%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
The %{name}-devel package contains libraries and header files for
|
||||||
|
developing applications that use %{name}.
|
||||||
|
|
||||||
|
%if %{with docs}
|
||||||
|
%package doc
|
||||||
|
Summary: Documentation for %{name}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description doc
|
||||||
|
Documentation for %{name}
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{pretty_name}-%{version} -S git
|
||||||
|
|
||||||
|
|
||||||
|
%build
|
||||||
|
%cmake -DUSE_XTENSOR:BOOL=TRUE -DUSE_EIGEN:BOOL=TRUE -DHIGHFIVE_EXAMPLES:BOOL=TRUE -DHIGHFIVE_UNIT_TESTS:BOOL=TRUE
|
||||||
|
%cmake_build
|
||||||
|
|
||||||
|
# Docs
|
||||||
|
%if %{with docs}
|
||||||
|
pushd %{_vpath_builddir}/doc
|
||||||
|
make doc
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%install
|
||||||
|
%cmake_install
|
||||||
|
|
||||||
|
# Move the CMake configurations to correct location
|
||||||
|
mkdir -p -m 0755 $RPM_BUILD_ROOT/%{_libdir}/cmake/%{pretty_name}/
|
||||||
|
mv $RPM_BUILD_ROOT/%{_datadir}/%{pretty_name}/CMake/* $RPM_BUILD_ROOT/%{_libdir}/cmake/%{pretty_name}/
|
||||||
|
rm -rvf $RPM_BUILD_ROOT/%{_datadir}/%{pretty_name}
|
||||||
|
|
||||||
|
%check
|
||||||
|
%if %{with tests}
|
||||||
|
# Test fails, reported upstream: https://github.com/BlueBrain/HighFive/issues/444
|
||||||
|
%ctest "-j1" "-E" "tests_high_five_base"
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%license LICENSE
|
||||||
|
%doc README.md VERSION CHANGELOG.md
|
||||||
|
%{_includedir}/*
|
||||||
|
%{_libdir}/cmake/%{pretty_name}
|
||||||
|
|
||||||
|
%if %{with docs}
|
||||||
|
%files doc
|
||||||
|
%license LICENSE
|
||||||
|
%doc %{_vpath_builddir}/doc/html
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Sun Apr 18 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.2.2-1
|
||||||
|
- Enable doc build
|
||||||
|
- include complete doc package in conditional
|
Loading…
Reference in New Issue
Block a user