From: malaterre Date: Mon, 28 Jan 2008 12:49:24 +0000 (+0000) Subject: COMP: Make log of compilation on vs 2005 a little more readable X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=b5f3df815c0d7b76369c3371f71afb8e5bd37ee5;p=gdcm.git COMP: Make log of compilation on vs 2005 a little more readable --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 6224b805..cdccd4aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)