]> Creatis software - clitk.git/commitdiff
Removed warnings with MSVC
authorsrit <srit>
Wed, 10 Feb 2010 14:59:49 +0000 (14:59 +0000)
committersrit <srit>
Wed, 10 Feb 2010 14:59:49 +0000 (14:59 +0000)
CMakeLists.txt
common/CMakeLists.txt
common/clitkImageToImageGenericFilter.txx

index 7c6adeb83450c4b0047c4472fca6f7f8d52c0adb..7b93d2632a68d9beccef5e34054154ef04da9ff7 100644 (file)
@@ -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)
index a51a929588bf4c45d626c317e176c366742fd21d..92fd73b41bf9f8909b39e90d03216e6eab172be3 100644 (file)
@@ -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
   )  
index 93f486f22d9ac86eb18730978f985469ebe8a84d..9029197db416f290ffc025b083a39f5b6894c80b 100644 (file)
@@ -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 <joel.schaerer@creatis.insa-lyon.fr>
              David Sarrut <david.sarrut@creatis.insa-lyon.fr>
 
@@ -41,6 +41,9 @@ void clitk::ImageToImageGenericFilterBase::SetNextOutput(typename ImageType::Poi
 
 
 //--------------------------------------------------------------------
+#ifdef _MSC_VER\r
+#  pragma warning(disable: 4715) //Disable "The specified function can potentially not return a value"
+#endif
 template<class ImageType> 
 typename ImageType::Pointer clitk::ImageToImageGenericFilterBase::GetInput(unsigned int n) {
   if (mInputFilenames.size() > n) {