Add patch to fix unit tests on big endian systems.
This commit is contained in:
parent
0d2648b0f7
commit
df8912ff8a
|
@ -0,0 +1,34 @@
|
|||
From fc8ec604f5cc4cafca063029adb2cdfee3107360 Mon Sep 17 00:00:00 2001
|
||||
From: Rafael Fonseca <rdossant@redhat.com>
|
||||
Date: Thu, 13 Oct 2016 15:36:20 +0200
|
||||
Subject: [PATCH] Fallback to HDF5 in case of big endian architectures.
|
||||
|
||||
Fixes https://github.com/imageworks/Field3D/issues/90
|
||||
---
|
||||
src/Field3DFile.cpp | 13 +++++++++++++
|
||||
1 file changed, 13 insertions(+)
|
||||
|
||||
diff --git a/src/Field3DFile.cpp b/src/Field3DFile.cpp
|
||||
index d34d364..e6caced 100644
|
||||
--- a/src/Field3DFile.cpp
|
||||
+++ b/src/Field3DFile.cpp
|
||||
@@ -826,6 +826,19 @@ bool Field3DInputFile::open(const string &filename)
|
||||
"In file: " + filename + " - Bad file hierarchy. ");
|
||||
success = false;
|
||||
}
|
||||
+ catch (runtime_error &e) {
|
||||
+ // HDF5 fallback
|
||||
+ m_hdf5.reset(new Field3DInputFileHDF5);
|
||||
+ m_hdf5Base = m_hdf5;
|
||||
+ if (m_hdf5->open(filename)) {
|
||||
+ // Handled. Just return.
|
||||
+ return true;
|
||||
+ } else {
|
||||
+ Msg::print(Msg::SevWarning,
|
||||
+ "In file: " + filename + ": " + string(e.what()));
|
||||
+ success = false;
|
||||
+ }
|
||||
+ }
|
||||
catch (...) {
|
||||
Msg::print(Msg::SevWarning,
|
||||
"In file: " + filename + " Unknown exception ");
|
|
@ -1,6 +1,6 @@
|
|||
Name: Field3D
|
||||
Version: 1.7.2
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: Library for storing voxel data
|
||||
|
||||
License: BSD
|
||||
|
@ -80,6 +80,9 @@ popd
|
|||
|
||||
|
||||
%changelog
|
||||
* Mon Oct 17 2016 Richard Shaw <hobbes1069@gmail.com> - 1.7.2-3
|
||||
- Add patch to fix unit tests on big endian systems.
|
||||
|
||||
* Wed Jun 29 2016 Orion Poplawski <orion@cora.nwra.com> - 1.7.2-2
|
||||
- Rebuild for hdf5 1.8.17
|
||||
|
||||
|
|
Loading…
Reference in New Issue