From: srit Date: Wed, 10 Feb 2010 14:59:49 +0000 (+0000) Subject: Removed warnings with MSVC X-Git-Tag: v1.2.0~812 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=e7bfce0e23746e76746103c5df34eee1351e13cf;p=clitk.git Removed warnings with MSVC --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c6adeb..7b93d26 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,9 @@ PROJECT(clitk) IF(CMAKE_COMPILER_IS_GNUCXX) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") ENDIF(CMAKE_COMPILER_IS_GNUCXX) +IF(MSVC) + ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS) +ENDIF(MSVC) #========================================================= # Find ITK (required) FIND_PACKAGE(ITK) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index a51a929..92fd73b 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -1,27 +1,6 @@ #========================================================= -# Compiled Image types -# Comment/uncomment desired image types - -#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DIMAGETYPE_CHAR") -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DIMAGETYPE_UCHAR") -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DIMAGETYPE_SHORT") -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DIMAGETYPE_USHORT") -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DIMAGETYPE_INT") -#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DIMAGETYPE_UINT") -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DIMAGETYPE_FLOAT") -#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DIMAGETYPE_DOUBLE") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I${ITK_DIR}/gdcm/src/") -#========================================================= -# Compiled Image Dimension -# Comment/uncomment desired image dimensions - -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DIMAGEDIM_1") -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DIMAGEDIM_2") -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DIMAGEDIM_3") -#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DIMAGEDIM_4") - #========================================================= INCLUDE(${PROJECT_SOURCE_DIR}/cmake/common.cmake) #========================================================= @@ -39,7 +18,6 @@ SET(clitkCommon_SRC clitkVfImageIO.cxx clitkVfImageIOFactory.cxx clitkOrientation.cxx - clitkSignal.cxx vvImage.cxx clitkImageToImageGenericFilter.cxx ) diff --git a/common/clitkImageToImageGenericFilter.txx b/common/clitkImageToImageGenericFilter.txx index 93f486f..9029197 100644 --- a/common/clitkImageToImageGenericFilter.txx +++ b/common/clitkImageToImageGenericFilter.txx @@ -3,8 +3,8 @@ Program: vv Module: $RCSfile: clitkImageToImageGenericFilter.txx,v $ Language: C++ - Date: $Date: 2010/02/09 14:40:55 $ - Version: $Revision: 1.4 $ + Date: $Date: 2010/02/10 14:59:49 $ + Version: $Revision: 1.5 $ Author : Joel Schaerer David Sarrut @@ -41,6 +41,9 @@ void clitk::ImageToImageGenericFilterBase::SetNextOutput(typename ImageType::Poi //-------------------------------------------------------------------- +#ifdef _MSC_VER +# pragma warning(disable: 4715) //Disable "The specified function can potentially not return a value" +#endif template typename ImageType::Pointer clitk::ImageToImageGenericFilterBase::GetInput(unsigned int n) { if (mInputFilenames.size() > n) {