[ismrmrd] 33/129: d/{control,rules}: add -dbg package for tools

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Wed Jan 14 20:00:11 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository ismrmrd.

commit ac00ff40d881073145de6ba9f3a50e363573400b
Author: Ghislain Vaillant <ghisvail at gmail.com>
Date:   Thu Apr 10 17:38:18 2014 +0100

    d/{control,rules}: add -dbg package for tools
---
 CMakeLists.txt                   | 10 ++++++++++
 debian/control                   | 23 +++++++++++++++++++++++
 debian/rules                     |  3 ++-
 tests/c++/t_ndarraycontainer.cpp | 35 ++++++++++++++---------------------
 4 files changed, 49 insertions(+), 22 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9d0de14..287a574 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -36,6 +36,16 @@ target_link_libraries(dummy ${XERCESC_LIBRARIES})
 # Add library ismrmrd
 add_library(ismrmrd SHARED ismrmrd_hdf5.cpp)
 
+# Add version string info
+set(ISMRMRD_VERSION_MAJOR 0)
+set(ISMRMRD_VERSION_MINOR 5)
+set(ISMRMRD_VERSION_PATCH 0)
+set(ISMRMRD_VERSION_STRING
+	${ISMRMRD_VERSION_MAJOR}.${ISMRMRD_VERSION_MINOR}.${ISMRMRD_VERSION_PATCH})
+set_target_properties(ismrmrd PROPERTIES
+	VERSION ${ISMRMRD_VERSION_STRING}
+	SOVERSION ${ISMRMRD_VERSION_MAJOR})
+
 #The findHDF5.cmake does not work very well on Windows, let's help it out
 IF(WIN32)
 	SET(HDF5_LIB_DIR ${HDF5_INCLUDE_DIR}/../lib)
diff --git a/debian/control b/debian/control
index ba034bd..c05de78 100644
--- a/debian/control
+++ b/debian/control
@@ -131,3 +131,26 @@ Description: ISMRM Raw Data format (ISMRMRD) - tools
  other calibration data.
  .
  This package contains the binary tools.
+
+Package: ismrmrd-tools-dbg
+Section: debug
+Priority: extra
+Architecture: any
+Depends:
+ ${misc:Depends},
+ ${shlibs:Depends},
+ ismrmrd-tools (= ${binary:Version})
+Suggests:
+ libfftw3-dbg,
+ libismrmrd0-dbg
+Description: ISMRM Raw Data format (ISMRMRD) - tools - debug symbols
+ The ISMRMRD format combines a mix of flexible data structures (XML header) 
+ and fixed structures (equivalent to C-structs) to represent MRI data.
+ .
+ In addition, the ISMRMRD format also specifies an image header for storing 
+ reconstructed images and the accompanying C++ library provides a convenient 
+ way of writing such images into HDF5 files along with generic arrays for 
+ storing less well defined data structures, e.g. coil sensitivity maps or 
+ other calibration data.
+ .
+ This package contains the debug symbols for the binary tools.
diff --git a/debian/rules b/debian/rules
index 9253390..4f6e5e7 100644
--- a/debian/rules
+++ b/debian/rules
@@ -9,6 +9,7 @@ BINPKG=libismrmrd0
 DBGPKG=libismrmrd0-dbg
 DOCPKG=libismrmrd0-dev-doc
 TOOLSPKG=ismrmrd-tools
+DBGTOOLSPKG=ismrmrd-tools-dbg
 
 %:
 	dh $@ -- --builddirectory=$(BUILDDIR) --buildsystem=cmake
@@ -31,4 +32,4 @@ endif
 
 override_dh_strip:
 	dh_strip --package=$(BINPKG) --dbg-package=$(DBGPKG)
-	dh_strip --package=$(TOOLSPKG)
+	dh_strip --package=$(TOOLSPKG) --dbg-package=$(DBGTOOLSPKG)
diff --git a/tests/c++/t_ndarraycontainer.cpp b/tests/c++/t_ndarraycontainer.cpp
index 0b30314..5feed2b 100644
--- a/tests/c++/t_ndarraycontainer.cpp
+++ b/tests/c++/t_ndarraycontainer.cpp
@@ -17,9 +17,8 @@ template<> struct populate <float> {
     static void random (NDArrayContainer<type>& ndac) {
         type mi = (type) std::numeric_limits<int>::max();
         assert (ndac.is_consistent());
-        size_t i = ndac.elements();
-        size_t j = ndac.data_.size();
-        for (; i>=1; i--)
+        size_t j = ndac.elements();
+        for (size_t i=0; i<j; i++)
             ndac[i] = 1.0 - 2.0 * (type)rand() / mi;
     }
 
@@ -32,9 +31,8 @@ template<> struct populate <double> {
     static void random (NDArrayContainer<type>& ndac) {
         type mi = (type) std::numeric_limits<int>::max();
         assert (ndac.is_consistent());
-        size_t i = ndac.elements();
-        size_t j = ndac.data_.size();
-        for (; i>=1; i--)
+        size_t j = ndac.elements();
+        for (size_t i=0; i<j; i++)
             ndac[i] = 1.0 - 2.0 * (type)rand() / mi;
     }
 
@@ -48,9 +46,8 @@ template<> struct populate <std::complex<float> > {
     static void random (NDArrayContainer<type>& ndac) {
         rtype mi = std::numeric_limits<int>::max();
         assert (ndac.is_consistent());
-        size_t i = ndac.elements();
-        size_t j = ndac.data_.size();
-        for (; i>=1; i--)
+        size_t j = ndac.elements();
+        for (size_t i=0; i<j; i++)
             ndac[i] = type(1.0, 1.0) - type(2.0 * (rtype)rand() / mi, 2.0 * (rtype)rand() / mi);
     }
     
@@ -64,9 +61,8 @@ template<> struct populate <std::complex<double> > {
     static void random (NDArrayContainer<type>& ndac) {
         rtype mi = std::numeric_limits<int>::max();
         assert (ndac.is_consistent());
-        size_t i = ndac.elements();
-        size_t j = ndac.data_.size();
-        for (; i>=1; i--)
+        size_t j = ndac.elements();
+        for (size_t i=0; i<j; i++)
             ndac[i] = type(1.0, 1.0) - type(2.0 * (rtype)rand() / mi, 2.0 * (rtype)rand() / mi);
     }
     
@@ -79,9 +75,8 @@ template<> struct populate <int> {
     static void random (NDArrayContainer<type>& ndac) {
         type mi = (type) std::numeric_limits<type>::max();
         assert (ndac.is_consistent());
-        size_t i = ndac.elements();
-        size_t j = ndac.data_.size();
-        for (; i>=1; i--)
+        size_t j = ndac.elements();
+        for (size_t i=0; i<j; i++)
             ndac[i] = rand();
     }
     
@@ -94,9 +89,8 @@ template<> struct populate <short> {
     static void random (NDArrayContainer<type>& ndac) {
         type mi = (type) std::numeric_limits<type>::max();
         assert (ndac.is_consistent());
-        size_t i = ndac.elements();
-        size_t j = ndac.data_.size();
-        for (; i>=1; i--)
+        size_t j = ndac.elements();
+        for (size_t i=0; i<j; i++)
             ndac[i] = rand();
     }
     
@@ -109,9 +103,8 @@ template<> struct populate <long> {
     static void random (NDArrayContainer<type>& ndac) {
         type mi = (type) std::numeric_limits<type>::max();
         assert (ndac.is_consistent());
-        size_t i = ndac.elements();
-        size_t j = ndac.data_.size();
-        for (; i>=1; i--)
+        size_t j = ndac.elements();
+        for (size_t i=0; i<j; i++)
             ndac[i] = rand();
     }
     

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/ismrmrd.git



More information about the debian-science-commits mailing list