]> Creatis software - gdcm.git/commitdiff
COMP: Make log of compilation on vs 2005 a little more readable
authormalaterre <malaterre>
Mon, 28 Jan 2008 12:49:24 +0000 (12:49 +0000)
committermalaterre <malaterre>
Mon, 28 Jan 2008 12:49:24 +0000 (12:49 +0000)
CMakeLists.txt

index 6224b8057913a4a34ff798f7c67859e9d1251f57..cdccd4aa9e73dc06b94c60710267cff9c083351f 100644 (file)
@@ -17,6 +17,13 @@ OPTION(GDCM_LEGACY_REMOVE "Remove all legacy code completely." OFF)
 OPTION(GDCM_LEGACY_SILENT "Silence all legacy code messages." OFF)
 MARK_AS_ADVANCED(GDCM_LEGACY_REMOVE GDCM_LEGACY_SILENT)
 
+# VS 2005 declared that some C functions were deprecated...
+IF(CMAKE_COMPILER_2005)
+  ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
+  ADD_DEFINITIONS(-D_SCL_SECURE_NO_DEPRECATE)
+ENDIF(CMAKE_COMPILER_2005) 
+
+
 #-----------------------------------------------------------------------------
 # Build shared lib by default
 OPTION(BUILD_SHARED_LIBS "Build GDCM with shared libraries." ON)