[ismrmrd] 214/281: Fixes for Windows compilation
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Wed Jan 14 20:01:16 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to annotated tag ismrmrd0.5
in repository ismrmrd.
commit 11d24a7f790b3e80b08c9f414319639d3fe2f8a9
Author: Thomas Sangild Sørensen <sangild at cs.au.dk>
Date: Wed Mar 19 13:41:38 2014 +0100
Fixes for Windows compilation
---
CMakeLists.txt | 13 +++++++++----
ismrmrd_hdf5.cpp | 2 +-
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 49d1ba1..20b37f2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,7 +18,13 @@ find_package(XSD REQUIRED)
find_package(XercesC REQUIRED)
set(Boost_NO_BOOST_CMAKE ON)
-find_package(Boost COMPONENTS thread system REQUIRED)
+if(WIN32)
+ add_definitions( -DBOOST_ALL_NO_LIB )
+ add_definitions( -DBOOST_ALL_DYN_LINK )
+endif(WIN32)
+
+find_package(Boost COMPONENTS thread system program_options REQUIRED)
+
find_package(HDF5 1.8 COMPONENTS C CXX REQUIRED)
#Process the XSD files
@@ -38,9 +44,8 @@ add_library(ismrmrd SHARED ismrmrd_hdf5.cpp)
#The findHDF5.cmake does not work very well on Windows, let's help it out
IF(WIN32)
- target_link_libraries(ismrmrd optimized ${HDF5_hdf5_LIBRARY_RELEASE} ${HDF5_hdf5_cpp_LIBRARY_RELEASE})
- target_link_libraries(ismrmrd debug ${HDF5_hdf5_LIBRARY_DEBUG} ${HDF5_hdf5_cpp_LIBRARY_DEBUG})
-
+ target_link_libraries(ismrmrd optimized ${HDF5_hdf5_LIBRARY_RELEASE} optimized ${HDF5_hdf5_cpp_LIBRARY_RELEASE})
+ target_link_libraries(ismrmrd debug ${HDF5_hdf5_LIBRARY_DEBUG} debug ${HDF5_hdf5_cpp_LIBRARY_DEBUG})
target_link_libraries(ismrmrd ${Boost_LIBRARIES})
ELSE (WIN32)
target_link_libraries(ismrmrd ${HDF5_LIBRARIES} ${Boost_LIBRARIES})
diff --git a/ismrmrd_hdf5.cpp b/ismrmrd_hdf5.cpp
index 4786218..fc40770 100644
--- a/ismrmrd_hdf5.cpp
+++ b/ismrmrd_hdf5.cpp
@@ -18,7 +18,7 @@ int IsmrmrdDataset::openHDF5File()
std::cerr << "File \"" << filename_ << "\" is not an HDF file file" << std::endl;
return -1;
}
- file_ = boost::shared_ptr<H5File>(new H5File(filename_, H5F_ACC_RDWR));
+ file_ = boost::shared_ptr<H5File>(new H5File(filename_.c_str(), H5F_ACC_RDWR));
} catch (...) {
std::cerr << "Failed to open HDF5 file." << std::endl;
--
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