Commit aa5a65ec authored by Samuel Debionne's avatar Samuel Debionne

Add support for MSCV 2017

And a couple of zarning fixes
parent 94251307
......@@ -224,7 +224,7 @@ if(LIMA_ENABLE_CONFIG)
else()
set(CONFIG_VERSION "win32-msvc2008")
endif()
elseif(${CMAKE_GENERATOR} MATCHES "2015")
elseif(${CMAKE_GENERATOR} MATCHES "2015|2017")
if (${CMAKE_GENERATOR} MATCHES "Win64$")
set(CONFIG_VERSION "win64-msvc2015")
else()
......@@ -248,7 +248,7 @@ if(LIMA_ENABLE_CONFIG)
set(extra_libs ${extra_libs} ${LIB_CONFIG})
set(common_srcs ${common_srcs} common/src/ConfigUtils.cpp)
set(control_srcs ${control_srcs} control/src/CtConfig.cpp)
link_directories(${LIB_CONFIG_DIR})
link_directories(${LIB_CONFIG_DIR})
set(extra_includes ${extra_includes} ${LIB_CONFIG_INCLUDE_DIR})
else()
message(FATAL_ERROR "libconfig++ not found, set LIB_CONFIG path or disable LIMA_ENABLE_CONFIG")
......@@ -346,8 +346,8 @@ if(LIMA_ENABLE_HDF5)
if(WIN32)
if (${CMAKE_GENERATOR} MATCHES "2008")
set(HDF5_VERSION "1.8.13")
elseif (${CMAKE_GENERATOR} MATCHES "2015")
set(HDF5_VERSION "1.8.19")
elseif (${CMAKE_GENERATOR} MATCHES "2015|2017")
set(HDF5_VERSION "1.8.20")
else()
message(FATAL_ERROR "Unsupported VS version for HDF5 saving format, only vs2008 or vs2015 are supported respectively for hdf5 1.8.13 and 1.8.16")
endif()
......@@ -357,6 +357,7 @@ if(LIMA_ENABLE_HDF5)
# we use static libs libhdf5.lib and libhdf5_cpp.lib
find_library(LIB_HDF5_CPP libhdf5_cpp ${LIB_HDF5_DIR})
find_library(LIB_HDF5 libhdf5 ${LIB_HDF5_DIR})
find_library(LIB_HDF5_HL libhdf5_hl ${LIB_HDF5_DIR})
find_library(LIB_ZLIB libzlib ${LIB_HDF5_DIR})
find_library(LIB_SZIP libszip ${LIB_HDF5_DIR})
else()
......@@ -365,8 +366,8 @@ if(LIMA_ENABLE_HDF5)
find_library(LIB_HDF5_CPP hdf5_cpp ${LIB_HDF5_DIR})
find_library(LIB_HDF5 hdf5 ${LIB_HDF5_DIR})
find_library(LIB_HDF5_HL hdf5_hl ${LIB_HDF5_DIR})
find_path(LIB_HDF5_INCLUDE_DIR H5Cpp.h)
link_directories(${LIB_HDF5_DIR})
find_path(LIB_HDF5_INCLUDE_DIR H5Cpp.h)
link_directories(${LIB_HDF5_DIR})
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(HDF5 DEFAULT_MSG LIB_HDF5 LIB_HDF5_INCLUDE_DIR)
......
......@@ -152,6 +152,7 @@ MemBuffer::MemBuffer(const MemBuffer& buffer)
MemBuffer::~MemBuffer()
{
if (!m_size)
// Function assumed not to throw an exception but does...
throw LIMA_COM_EXC(Error, "Deleting empty buffer");
release();
}
......
......@@ -364,13 +364,13 @@ void CtSaving::Stream::createSaveContainer()
#endif
goto common;
case HDF5GZ:
#if not defined (WITH_HDF5_SAVING) && not defined (WITH_Z_COMPRESSION)
#if !defined (WITH_HDF5_SAVING) && !defined (WITH_Z_COMPRESSION)
THROW_CTL_ERROR(NotSupported) << "Lima is not compiled with the hdf5 gzip"
"saving option, not managed";
#endif
goto common;
case HDF5BS:
#if not defined (WITH_HDF5_SAVING) && not defined (WITH_BS_COMPRESSION)
#if !defined (WITH_HDF5_SAVING) && !defined (WITH_BS_COMPRESSION)
THROW_CTL_ERROR(NotSupported) << "Lima is not compiled with the hdf5 bs"
"saving option, not managed";
#endif
......
......@@ -480,9 +480,9 @@ void SaveContainerHdf5::_close(void* f) {
long SaveContainerHdf5::_writeFile(void* f,Data &aData,
CtSaving::HeaderMap &aHeader,
CtSaving::FileFormat aFormat) {
DEB_MEMBER_FUNCT();
DEB_MEMBER_FUNCT();
_File* file = (_File*)f;
_File* file = (_File*)f;
size_t buf_size = 0;
// get the proper data type
......@@ -615,10 +615,10 @@ long SaveContainerHdf5::_writeFile(void* f,Data &aData,
file->m_dataset_extended = true;
}
// write the image data
int image_nb = aData.frameNumber % m_nbframes;
hsize_t image_nb = aData.frameNumber % m_nbframes;
// we test direct chunk write
hsize_t offset[RANK_THREE] = {image_nb, 0, 0};
hsize_t offset[RANK_THREE] = {image_nb, 0U, 0U};
uint32_t filter_mask = 0;
hid_t dataset = file->m_image_dataset->getId();
herr_t status;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment